Original Post
I recently wrote a program that loaded the .3do file type (it''s a 3D file format). It worked just fine, and then I tried to turn it into a class and it''s now giving me this:
Screenshot
The problem always occurs here:
Screenshot
The problem always occurs here:
vector<string*> lines;
ifstream file(filename);
while(!file.eof())
{
char* temp = new char[999]; //This Line causes the error
file.getline(temp, 999);
if(temp[0] == ''#'')
{
goto end;
}
lines.push_back(new string(temp));
NumLines++;
end:
delete[] temp;
}
This code read the file and puts it into a vector of strings, as well as removing comments (lines that start with a #)
when I run in debug mode. And in normal mode the program crashes if I hit retry on that dialog box. Any ideas as to why?