switch(choice)
{
case '2':
for(y=0; y{
for(x=0; x{
*array=getche();
array++;
}
*array='\r';
array++;
printf("\n");
} // end for
level.WriteNewLevel(array);
break;
} // end switch
The variable "array" is a character pointer with all the space needed allocated. Here's the class function, WriteNewLevel():
void CLevelDesc::WriteNewLevel(char *data)
{
// go to the end of the file
mmioSeek(file, 0, SEEK_END);
// Write the data to file
mmioWrite(file,data,(CELL_X+1)*(CELL_Y));
}
The problem is that my file now holds 315 letters of garbage where it should hold 320 letters of whatever I specify (right now I'm trying to use just one character that is solid throughout the file.) Could someone help me?
------------------
That's how you do it, but that's just the opinion of a MADMAN!!! BWAHAHAAHAHA! :D :D :D








