Hi all,
I want to access/read different pages of a text file.(I mean how i can jump on different pages in a file).Can any help me in this respect.
thanxxxxxxxxxxx
Hi all,
I want to access/read different pages of a text file.(I mean how i can jump on different pages in a file).Can any help me in this respect.
thanxxxxxxxxxxx
You should define first what is the page... The standard text file has no such thing
All problems in computer science can be solved by another level of indirection,
except for the problem of too many layers of indirection.
– David J. Wheeler
Perhaps you're thinking of some kind of document file?
"If you tell the truth, you don't have to remember anything"
-Mark Twain
You can say,it may be a Pdf file or document file.But i am facing problem in accessing Pdf file in C++.And now i have to access a file with multiple pages.
For standard file access in C++, you would be using the fstream classes. The fstream classes can understand formatting for raw text (i.e. .txt) and for binary information (i.e. 0101011).
PDF, WordDoc, Rich Text and all of those other things are stored in specified formats (that's why different programs can all use them). C++ does not come with libraries to handle these formats, but you can probably find SDKs online. What format are you dealing with in this "multi-paged" document?
Last edited by CodeMonkey; 07-03-2007 at 12:57 AM. Reason: typo
"If you tell the truth, you don't have to remember anything"
-Mark Twain
Dear,
i am using at the moment a txt file for my program.But i have to extend my program upto multiple pages.One idea i have in my mind is to put page number between the lines in txt file and then to read those numbers.Any other idea will be appreciated.
Thanxxxxxxxxxxxxx
A text file has no concept of pages. You have to explain how you want to identify different page. What makes a page in your text file? Is it 80 lines? Is it 200 lines? Is it however much text fits in a page when you open it with Wordpad?
The problem with separating pages with a page number is that you might not know whether the number is part of the text or not. Most file types that keep track of page numbers do it with special codes that are placed in the text.