I've just started learning C. When I compile the program below, either
with 'gcc' or 'g++' no errors were displayed and the binary file will be
created. When I execute it, nothing will happen at all. What have I done
wrong?
***********************************************************
#include <stdio.h>
#include <string.h>
int main()
{
int x;
x=0;
while (x==0)
{
x=getchar();
}
printf("%d = %c\n",x,x);
return 0;
}
************************************************************
- Re: Newbie : Simple yet not working :( Philip Tong
- Re: Newbie : Simple yet not working :( Glynn Clements
