I'm using MSVC9 in Rhapsody to build my model into an executable. I try to use <iostream> to log different things in a text file as my model is running for post-treatment. According to a tutorial about iostream I found, I have an operation that does this:
ofstream myfile;
myfile.open ("example.txt");
myfile << "Writing this to a file.\n";
myfile.close();
When building, I get an error that the fstream type is unknown.
I also tried to have an attribute that is declared with type <iostream>::fstream called myfile, removing the first line of my operation's code.
Of course, I added both <iostream> and <fstream> to the standard headers of my executable (still according to the tutorial).
How could I get this to work ? Thanks everyone !