Good day folks.
I have a text file that I'd like to show the user but first I need to edit the text a bit.
I was thinking about using the get command but I dont know how big the file is so I dont know who big the buffer needs to be. Is there any way to check the file size or if anyone has any better ideas as to reading the file into a buffer Im all ears.Code:std::fstream infile("test.txt"); if (! infile.eof() ) std::cout << "could not open file" << std::endl; // some get or getline function
Another thing, once the file has been placed into a buffer, how can I then as simple as possible edit the file. Say i.e. I have html and want to remove all html tags, how I go about doing such a thing. Links to any tutorials would be excellent.
Appreciate any inout on the subject.