Hey there, im a newbie and first time poster .... so please be nice!!
Im working on an assignment to create a basic text file editor which was all going dandy until i've realised the functions I've been using to get a line number off user produce wrong results
Code:
printf("\nLine No: ");
scanf("%d", &linenum);
printf("You entered line no. %d", linenum);
and
Code:
printf("\nLine: ");
fscanf(stdin, "%d", &linenum);
printf("Line No chosen is %d", linenum);
these both added '69' on to whatever is entered when printing linenum again
any helpful suggestions would be most appreciated!!
Thanks