My program crashes when I try to print; got any thoughts?
Thanks
My program crashes when I try to print; got any thoughts?
Thanks
In your print function:
char* buff = "Roster Starts at: ";
You have created a const character array with size 19. First of all, you can't change this array because it's const. Second, the size of the buffer is not large enough to hold the complete string. Make sure the buff array is large enough:And use strcat if you want to add strings...Code:char buff[BUFSIZ]; strcpy(buff, "Roster Starts at: ");
Cheers,
Monster
oh, woops. I forgot about changing the way I declared it when I added all he strcpy()'s underneath