Strange Response
I was debugging my program and came across a strange error:
Here is the code:
fflush(stdin);
display_convert_from();
gets(DataStore_userinput);
printf("datastoreuserinput is %d", DataStore_userinput); getchar(); getchar();
The print statement is to verify that I'm getting the correct number back.
The problem is I enter the number "3", but the printf statement comes back as
"datastoreuserinput is -62".
-62?
I have no idea how that happened.
Does anyone know why this is happening and how to resolve this?
Thanks.
Here is the code:
fflush(stdin);
display_convert_from();
gets(DataStore_userinput);
printf("datastoreuserinput is %d", DataStore_userinput); getchar(); getchar();
The print statement is to verify that I'm getting the correct number back.
The problem is I enter the number "3", but the printf statement comes back as
"datastoreuserinput is -62".
-62?
I have no idea how that happened.
Does anyone know why this is happening and how to resolve this?
Thanks.
