how write to a file?

see these code that i use for write on file:
1
2
cout << "void "<< tokens[1].Description << " " << tokens[2].Description;
                File <<"void "<< tokens[1].Description << " " << tokens[2].Description;

the 'cout' it's done, but not the 'File'...
can i test if it's writed or valid? or it's too much "<<"?
Last edited on
fixed... i was doing to much open() and close()... maybe these was the big problem
The code you posted is valid, if we assume all else is OK (array accesses and all that).

Can you please show a complete, minimal example that replicates your issue?
Chances are your File object (std::fstream or std::ofstream) is in some bad state.

PS: You can't have "too much" <<.
Last edited on
i was doing too much 'open()' and 'close()'.. line by line. maybe these was the big problem
Registered users can post here. Sign in or register to post.