why cann't the getchar() return?
hi all
i just want to get a char from getchar(),but the getchar never return regardless how many characters i input and hit enter here is the program i encounter the problem: Code:
int main(int argc, char **argv){ what's the problem? thanks in advance |
Try switching to scanf to get input within the program. Getchar isn't really waiting for any input and it will continue right away even if no input is found immediately. Scanf will wait for input.
Linux |
i'll have a try with scanf
but i still wonder why getchar doesnot work as we want |
everything goes well afer memseting childMsg everytime before msgrcv
thank you all |
All times are GMT -5. The time now is 12:01 AM. |