Advertisement

stuck on 3ds

Started by October 30, 2003 04:22 AM
1 comment, last by pIpEs ClaNGoR 21 years, 4 months ago
I am having a problem reading the Object description Block 0x4000 in the 3ds file. From what I have read is that this has the info of the character name of the file and it has to be read to get to the verts. I have something like this:

case 0x4000:
  i=0;
  while((ch = fgetc(modelfile)) != 0)
  {
     name[i]=ch;
     i++;
  }
break; 
and I just want to read this just to move the pointer but all it does is just do an inf. loop. I have read that the end of the char string is 0 and thats when it is supose to stop but it doesn''t. Is there an easyer way to read and/or skip this?
---------------------------The pipes clangor all the time.
try this:

while((ch = fgetc(modelfile)) != ''\0'')


Advertisement
or this:
while (!feof(modelfile)){   name = fgetc(modelfile);   i++;}

This topic is closed to new replies.

Advertisement