T
Tom Andrecht
I'm trying to get some information dumped from a program that's giving me
fits, but when i try to use the ofstream class to dump to file, i get a
message from the compiler that it doesn't exist. This is a simple program
for a class (intro to opengl) wich uses only one .cpp file and has included
at the beginning #include <fstream>. the code below is what I know to be
correct for opening and writing to a file, but the ofstream declaration
comes up invalid even though intellisense knows what's going on and gives me
my members lists. could i possibly have a corrupt install? or am i looking
at this crosseyed and my code is wrong? Thanks
ofstream mazestream;
mazestream.open("path.txt", std::ios::app);
for (int i = 0; i < 100; i++)
{
mazestream.write(square);
mazestream.write("\n");
}
mazestream.close();
fits, but when i try to use the ofstream class to dump to file, i get a
message from the compiler that it doesn't exist. This is a simple program
for a class (intro to opengl) wich uses only one .cpp file and has included
at the beginning #include <fstream>. the code below is what I know to be
correct for opening and writing to a file, but the ofstream declaration
comes up invalid even though intellisense knows what's going on and gives me
my members lists. could i possibly have a corrupt install? or am i looking
at this crosseyed and my code is wrong? Thanks
ofstream mazestream;
mazestream.open("path.txt", std::ios::app);
for (int i = 0; i < 100; i++)
{
mazestream.write(square);
mazestream.write("\n");
}
mazestream.close();