Hey guys,
I'm new in here and from Austria.
Tomorrow I've to present a programmed game and the input of a textfile doesn't work.
I get the errors "ios" has not been declared and
"in" was not declared in this scope.
The error has to be in the line where the fstream commands are.
Code:
int table_x=20, table_y=20;
char cstring[256];
/*highscore____________________________open highscore.dat_______________________________*/
std::fstream datfile;
datfile.open("highscore.dat", ios::in);
/*highscore____________________________highscores_______________________________*/
while(mouse_x<=70||mouse_x>=255||mouse_y<=340||mouse_y>=410||!mouse_b&1)
{
draw_sprite(screen, menu_background, background_x, background_y);
draw_sprite(screen, button_quit, button_x, button_quit_y);
/*highscore________________________highscores___________________________________*/
while (!datfile.eof())
{
datfile.getline(cstring, sizeof(cstring));
textprintf_ex(screen,font,table_x,table_y,makecol(255,255,255), makecol(0, 0, 0),"%s", cstring);
table_y=table_y+10;
}
Thank you so much.