
- Forum
- Programming Talk
- C and C++
- syntax error at end of input
syntax error at end of input
This is a discussion on syntax error at end of input within the C and C++ forums, part of the Programming Talk category; i have this project in my cs class and the code always generate a "syntax error at end of input" ...
-
03-20-2011, 04:19 AM #1
- Join Date
- Mar 2011
- Answers
- 1
syntax error at end of input
i have this project in my cs class and the code always generate a "syntax error at end of input" message. i double checked the placement of the curly braces but I can't seem to find an error. Here's the chunk of code:
can anyone tell me what's wrong?Code:void func3(char *ans_ptr) { char *ans; int ctr=0; if(*ans_ptr == 'C'|| *ans_ptr=='c') { ctr++; printf("Correct!\n"); } else { printf("Sorry! You're wrong! \n"); getchar(); } }
-
variable ans is not being used anywhere. May be, removing that should resolve the problem. Would have been helpful if you could have pasted the entire code, at times the problem may lie outside of this block of function.
-
hi, is any one can help me...?
I'm very new in c++ and now I want to write a syntax for input number 111 which will give out put in chart (hundredth eleven). please write for me a simple syntax so I can understand it. THX
-
hi allldo...try using itoa function from string.h library...
-
Sponsored Ads
«
Syntax
|
please simplify this code. i am unable to understand it... but your team has done a great work.
»

Reply With Quote





