ganeshsheshadri
January 11th, 2002, 01:16 PM
Hai,
I have the following code (in C++) to open and read a word document(.doc file). But, the getLine method always returns junk characters. Why does this happen. The same code works for .txt files. Is there something else that I need to do when reading the MS Word files?
char buf[80];
ifstream stream;
stream.open("C:\\test1.doc");
while(stream.getline(buf,80) != NULL)
{
MessageBoxNULL,buf,"",MB_OK);
}
Thanks in advance,
GPS
I have the following code (in C++) to open and read a word document(.doc file). But, the getLine method always returns junk characters. Why does this happen. The same code works for .txt files. Is there something else that I need to do when reading the MS Word files?
char buf[80];
ifstream stream;
stream.open("C:\\test1.doc");
while(stream.getline(buf,80) != NULL)
{
MessageBoxNULL,buf,"",MB_OK);
}
Thanks in advance,
GPS