View Full Version : read .ASE file

02-25-2001, 11:43 PM
I need help to read .ase files!

this is the way I do to read a line and save it for later use:

void LoadAse(char *filename)
char buff[200];
ifstream fin:


do {
fin.getline(buff, sizeof(buff));

if(strcmp("*MESH_VERTEX", buff) == 0)
sscanf(buff, "*MESH_VERTEX %f %f %f", &object.x, &object.y, &object.z);

}while(!=fin.eof()) <-- how to check EOF ?

1. this line : sscanf(buff, "*MESH_VERTEX %f %f %f", &object.x, &object.y, &object.z); doesnīt work because the *MESH_VERTEX isnīt at the start of the line how to fix this ?

2. how to check if I am at the end of the file (EOF) ??

Thanks for your answers http://www.opengl.org/discussion_boards/ubb/smile.gif