Read ASCII from .doc file

Hi!

I need to read ASCII for characters from a Micrsoft Word document and separe it into words.Example: hi hi - 105106 SPACE 105106.


How I can make this?



Sorry for bad english.
you use #include <ifstream> / <ofstream> first then you make a file object for some reason; like soo ifstream letterfile ("letterz.txt");

so now i could cout<<letterfile;

i could even do things like this
1
2
3
4
5
6
7
 for (int q = 0; q<27; q++)
        {
            for (int z = 0; z<36; z++)
            {
                letterfile >> box[q][z];
            }
        }


I recomend you experiment with string manipulating code XD
But ifstream/ofstream read only .txt files. I need to read .doc file.

Thanks.
florin112 wrote:
But ifstream/ofstream read only .txt files.

Not correct. If the file is opened in binary mode, then absolutely any type of data can be read. Use ios::binary when opening the file.
Topic archived. No new replies allowed.