Image

Imagepyro01 wrote in Imagecpp

sometimes when I try to use scanf() or fgets() I have to use it twice, because it tries to enter it from the buffer. I dont know if it enters from the output buffer, or if there even is an input buffer, but if there is, is there a way to clear it, so i'm not stuck with doing:
printf("What is the student's name?\n");
fgets(&stemp.name[0], 2, stdin);
fgets(&stemp.name[0], 45, stdin);