I have compile a program, below is a part of the code:
typedef enum{false,true}boolean;
But after compile it give me the following error
expected identifier before "false"
expected "}" before "false"
expected unqualified-id before "false"
expected ',' or ';' before "false"
expected declaration before "}" token.
I'm using the Dev-C++ to compile
Can anybody help me.Thank You
How To Fix This error
|
Contributor
|
|
| 21Apr2006,10:20 | #1 |
|
Last edited by lieweffect; 21Apr2006 at 10:44.. |
|
Go4Expert Founder
|
![]() |
| 21Apr2006,10:59 | #2 |
|
typedef enum{false,true}boolean; means you are assigning value 0 to the false and 1 to true but it might so happen that its predefined for the compiler.
|
|
Contributor
|
|
| 21Apr2006,12:14 | #3 |
|
Then how do I fix it?
Thank You I attached together with the code. If possible could you fix it and make an execute program to me Thank You |
|
Team Leader
|
![]() |
| 21Apr2006,14:30 | #4 |
|
Just try replacing it with typedef enum{_false_,_true_}_boolean_; and see if it compiles or there are some more errors somewhere else.
|
|
Contributor
|
|
| 21Apr2006,14:39 | #5 |
|
Quote:
Originally Posted by coderzone Last edited by lieweffect; 21Apr2006 at 14:51.. |
|
Team Leader
|
![]() |
| 21Apr2006,16:50 | #6 |
|
What are the errors coming.
|
|
Contributor
|
|
| 21Apr2006,18:29 | #7 |
|
Quote:
Originally Posted by coderzone |
|
Team Leader
|
![]() |
| 21Apr2006,20:22 | #8 |
|
Quote:
Originally Posted by lieweffect |
|
Contributor
|
|
| 21Apr2006,20:26 | #9 |
|
Quote:
Originally Posted by coderzone My e-mail: lieweffect@yahoo.com |
|
Team Leader
|
![]() |
| 21Apr2006,20:33 | #10 |
|
GMail does not allow me to upload exe files and I have renamed it to g4e file. Please rename it to exe file.
|


