This isn't really a C++ question, but anyway, wouldn't it be easier to simply read the other help?
Also, get yourself a real C++ compiler. By real, I mean one that is less than sixteen years old. Preferably one that came out *after* the 1998 standard. Actually, get rid of any compiler older than 2001.
i am working on a project with text files reading / writing / processing
and the thing is that i think that these compilers , as old as they are, they are working fast with files.
for example.
i wrote a simple code (loop), in that "old" compiler ,to read one text file (big one) char by char and writing it to a new file. i timed that process running time.
i wrote the exact same algorythem in Visual Basic , same algorythem with VB commands (of course), i timed that process running time too.
i already dont remember of the number of seconds that it took for VB against the C but i do remember that it took the VB 13 times more seconds then the "old" C++.
thats why i still like to work with that compiler., although that obviusly its more compfertable to work with the newer once....
You're kidding, right? You're comparing compiled C++ to interpreted Visual Basic? Seriously? You don't see any problem with that?
There's a very good reason interpreted languages are slower than compiled languages. It's because they're interpreted. A good chunk of your CPU is used to try and make sense of the ridiculous symbols us puny humans use to convey ideas, and strap together something that is somewhat runnable, in real time.
Try rewriting that program to read the whole file into a buffer (using C/++ to read character-by-character. Isn't that cute?) and compile it optimized on the latest GCC -- or any modern compiler, for that matter-- then have it read a 10 MB file. Tell me how it compares to the other version. In the worst case, you'll get a tenfold speed increment.
Here's a sample:
/*
return value: pointer to a buffer containing a copy of the file contents, or 0
if there was an error.
name: path to the file.
len: pointer to a long that will receive the length of the buffer. In case of an
error, this is set to -1.
*/
char *readfile(char *name,long *len){
std::ifstream file(name,std::ios::binary);
if (!file){
*len=-1;
return 0;
}
file.seekg(0,std::ios::end);
long pos=file.tellg();
*len=pos;
file.seekg(0,std::ios::beg);
char *buffer=newchar[pos];
file.read(buffer,pos);
file.close();
return buffer;
}
And asking how to move a help file from one program to another is only remotely related to the C++ language.