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:
fin.open(filename);
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 ?
questions:
-
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 ?
-
how to check if I am at the end of the file (EOF) ??
Thanks for your answers