Closed Thread
Results 1 to 9 of 9

Thread: File Processing in C

  1. #1
    Maze's Avatar
    Maze is offline Learning Programmer
    Join Date
    Dec 2008
    Posts
    32
    Rep Power
    0

    File Processing in C

    Can we read .htm, .pdf, .chm or any kind of file types in c.

    Thanks for help

  2. CODECALL Circuit advertisement
    Join Date
    Always
    Posts
    Many

     
  3. #2
    Mathematix is offline Programmer
    Join Date
    Jun 2009
    Posts
    112
    Rep Power
    0

    Re: File Processing in C

    You can read or write anything you like to a file in C or C++. Where it becomes significant is where you read/write in either binary or text modes to determine how your program interprets the data.

  4. #3
    Maze's Avatar
    Maze is offline Learning Programmer
    Join Date
    Dec 2008
    Posts
    32
    Rep Power
    0

    Re: File Processing in C

    For example can i read .chm or .pdf file like i read .txt file_?

  5. #4
    Join Date
    Jul 2006
    Posts
    16,486
    Blog Entries
    75
    Rep Power
    143

    Re: File Processing in C

    You have to account for the different encodings. Large portions of a .pdf file are not text. Also, pdf files are at least partially zipped data.
    Programming is a branch of mathematics.
    My CodeCall Blog | My Personal Blog

  6. #5
    Mathematix is offline Programmer
    Join Date
    Jun 2009
    Posts
    112
    Rep Power
    0

    Re: File Processing in C

    Quote Originally Posted by WingedPanther View Post
    You have to account for the different encodings. Large portions of a .pdf file are not text. Also, pdf files are at least partially zipped data.
    Well, you can read or write absolutely anything you like to a file. The concept of its format only comes into being when the algorithm interpreting its content into meaningful data becomes apparent.

    This is true for any file of any format. All a program does is read bytes from a file before that data is parsed to be somehow meaningful.

  7. #6
    Mathematix is offline Programmer
    Join Date
    Jun 2009
    Posts
    112
    Rep Power
    0

    Re: File Processing in C

    Quote Originally Posted by Maze View Post
    For example can i read .chm or .pdf file like i read .txt file_?
    Yes you can, but as a .CHM is a binary file you will have to work some coding magic to convert its content into pure text.

  8. #7
    Maze's Avatar
    Maze is offline Learning Programmer
    Join Date
    Dec 2008
    Posts
    32
    Rep Power
    0

    Re: File Processing in C

    Mathematix great thanks. I completely understand the matter.

  9. #8
    Maze's Avatar
    Maze is offline Learning Programmer
    Join Date
    Dec 2008
    Posts
    32
    Rep Power
    0

    Re: File Processing in C

    + rep

  10. #9
    Mathematix is offline Programmer
    Join Date
    Jun 2009
    Posts
    112
    Rep Power
    0

    Re: File Processing in C

    No problem, Maze! Good luck.

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Urgent file processing help!!!!! :(
    By russian777 in forum C and C++
    Replies: 5
    Last Post: 04-03-2009, 03:59 AM
  2. File processing help!!!!
    By russian777 in forum C and C++
    Replies: 2
    Last Post: 03-30-2009, 07:53 PM
  3. Not processing php
    By thomas123 in forum PHP Development
    Replies: 3
    Last Post: 12-15-2008, 10:26 PM
  4. I/O processing
    By renoald in forum Visual Basic Programming
    Replies: 4
    Last Post: 09-24-2008, 12:03 AM
  5. Processing
    By Matt in forum General Programming
    Replies: 2
    Last Post: 07-12-2007, 10:45 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts