Its a unicode file created with gedit.What application should I use for an ascii file?It seems to be off quite a bit.Here is more code showing some of my attempts .I am shortening my world to 100 characters until I figure this out.
for(int x=0;x<=worldheight;++x)
{
// for(int y=0;y<=worldwidth-1;y++)
// {
// fgets(world[x],worldwidth,WORLD);
fread(world[x],sizeof(char),worldwidth,WORLD);
// fseek(WORLD,x*worldwidth,SEEK_SET);
printf("world y =%d \n",strlen(world[x]));
printf("world[x] =%s \n",world[x]);
// }
}
If I know the length of the newline character maybe I can fseek past it ?or shorten my reads by that amount?
Any example code will be contibution to my eventually open source game