Can we read .htm, .pdf, .chm or any kind of file types in c.
Thanks for help
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.
For example can i read .chm or .pdf file like i read .txt file_?
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.
Mathematix great thanks. I completely understand the matter.
+ rep![]()
No problem, Maze! Good luck.![]()
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks