File IO - File creation
Hello forum members
My goal with my code is to design a system of creating a series of XML files based on whether or not a specific XML file exists.
When I attempt to compile, I get these errors from the compiler (Dev-C++).
cout << "The configuration files have already been created."<<"\n" ;
" void value not ignored as it ought to be"
" expected `)' before ';' token "
"expected `;' before ')' token "
Any help is appreciated!
line 4 if i remember well,function open has as return value nothing,thus void,so the compiler can not accept such a statement! Fix this and then the other two errors may go away.
Tip:When you get a series of errors ,try fixing them from top!Because there is a big possibility that one or more errors which follow to be created by the errors that are on top!
it appears that your understanding of basic C++ concepts is a bit lacking. in your program, "while" should be replaced with "for", and ofstream:: open does not return anything, so checking if it's equal to 1 is certainly going to be a problem (void value not ignored as it ought to be).
also your indentation is nearly nonexistent. in Dev-C++ you have to TRY to make code that looks this bad.