Click here to Skip to main content
15,899,313 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
Okay. If you don't need code i will send error when i debug.
Compiling...
COMPILER.CPP
C:\Documents and Settings\PhongLan\Desktop\COMPILER.CPP(23) : error C2059: syntax error : 'constant'
C:\Documents and Settings\PhongLan\Desktop\COMPILER.CPP(23) : error C2143: syntax error : missing ';' before '}'
C:\Documents and Settings\PhongLan\Desktop\COMPILER.CPP(23) : error C2143: syntax error : missing ';' before '}'
C:\Documents and Settings\PhongLan\Desktop\COMPILER.CPP(33) : error C2440: 'initializing' : cannot convert from 'const int' to 'enum boolean'
Conversion to enumeration type requires an explicit cast (static_cast, C-style cast or function-style cast)
C:\Documents and Settings\PhongLan\Desktop\COMPILER.CPP(40) : error C2440: 'default argument' : cannot convert from 'const int' to 'enum boolean'
Conversion to enumeration type requires an explicit cast (static_cast, C-style cast or function-style cast)
C:\Documents and Settings\PhongLan\Desktop\COMPILER.CPP(40) : error C2440: 'default argument' : cannot convert from 'const int' to 'enum boolean'
Conversion to enumeration type requires an explicit cast (static_cast, C-style cast or function-style cast)
C:\Documents and Settings\PhongLan\Desktop\COMPILER.CPP(40) : error C2548: 'generatecode' : missing default parameter for parameter 6
C:\Documents and Settings\PhongLan\Desktop\COMPILER.CPP(40) : error C2548: 'generatecode' : missing default parameter for parameter 7
C:\Documents and Settings\PhongLan\Desktop\COMPILER.CPP(77) : error C2440: 'initializing' : cannot convert from 'const int' to 'enum boolean'
Conversion to enumeration type requires an explicit cast (static_cast, C-style cast or function-style cast)
C:\Documents and Settings\PhongLan\Desktop\COMPILER.CPP(95) : error C2065: 'clrscr' : undeclared identifier
C:\Documents and Settings\PhongLan\Desktop\COMPILER.CPP(103) : error C2440: '=' : cannot convert from 'const int' to 'enum boolean'
Conversion to enumeration type requires an explicit cast (static_cast, C-style cast or function-style cast)
C:\Documents and Settings\PhongLan\Desktop\COMPILER.CPP(123) : error C2440: '=' : cannot convert from 'const int' to 'enum boolean'
Conversion to enumeration type requires an explicit cast (static_cast, C-style cast or function-style cast)
C:\Documents and Settings\PhongLan\Desktop\COMPILER.CPP(142) : error C2440: '=' : cannot convert from 'const int' to 'enum boolean'
Conversion to enumeration type requires an explicit cast (static_cast, C-style cast or function-style cast)
C:\Documents and Settings\PhongLan\Desktop\COMPILER.CPP(225) : error C2440: '=' : cannot convert from 'const int' to 'enum boolean'
Conversion to enumeration type requires an explicit cast (static_cast, C-style cast or function-style cast)
C:\Documents and Settings\PhongLan\Desktop\COMPILER.CPP(243) : error C2440: '=' : cannot convert from 'const int' to 'enum boolean'
Conversion to enumeration type requires an explicit cast (static_cast, C-style cast or function-style cast)
C:\Documents and Settings\PhongLan\Desktop\COMPILER.CPP(289) : error C2440: '=' : cannot convert from 'const int' to 'enum boolean'
Conversion to enumeration type requires an explicit cast (static_cast, C-style cast or function-style cast)
C:\Documents and Settings\PhongLan\Desktop\COMPILER.CPP(436) : error C2440: '=' : cannot convert from 'const int' to 'enum boolean'
Conversion to enumeration type requires an explicit cast (static_cast, C-style cast or function-style cast)
C:\Documents and Settings\PhongLan\Desktop\COMPILER.CPP(469) : error C2440: '=' : cannot convert from 'const int' to 'enum boolean'
Conversion to enumeration type requires an explicit cast (static_cast, C-style cast or function-style cast)
C:\Documents and Settings\PhongLan\Desktop\COMPILER.CPP(629) : error C2660: 'generatecode' : function does not take 3 parameters
C:\Documents and Settings\PhongLan\Desktop\COMPILER.CPP(642) : error C2660: 'generatecode' : function does not take 5 parameters
C:\Documents and Settings\PhongLan\Desktop\COMPILER.CPP(666) : error C2660: 'generatecode' : function does not take 5 parameters
C:\Documents and Settings\PhongLan\Desktop\COMPILER.CPP(702) : error C2664: 'generatecode' : cannot convert parameter 6 from 'const int' to 'enum boolean'
Conversion to enumeration type requires an explicit cast (static_cast, C-style cast or function-style cast)
C:\Documents and Settings\PhongLan\Desktop\COMPILER.CPP(704) : error C2660: 'generatecode' : function does not take 0 parameters
C:\Documents and Settings\PhongLan\Desktop\COMPILER.CPP(728) : error C2664: 'generatecode' : cannot convert parameter 6 from 'const int' to 'enum boolean'
Conversion to enumeration type requires an explicit cast (static_cast, C-style cast or function-style cast)
C:\Documents and Settings\PhongLan\Desktop\COMPILER.CPP(732) : error C2664: 'generatecode' : cannot convert parameter 6 from 'const int' to 'enum boolean'
Conversion to enumeration type requires an explicit cast (static_cast, C-style cast or function-style cast)
Posted
Updated 29-Nov-09 3:59am
v2

Wow - your code had this many errors ? The errors all mean exactly what they say. A decent question would be, I have this line of code, and here is the error the compiler gives me, not here's a ton of code that doesn't even compile, can you fix it all for me. Looking at the list of errors, it looks to me like you have no clue about C++.

C:\Documents and Settings\PhongLan\Desktop\COMPILER.CPP(629) : error C2660: 'generatecode' : function does not take 3 parameters

How hard can that be to work out ? If I just fixed this ugly, messy code so it compiled, how would that really help you ? You'd have NO idea how it worked or why. Why not try reading a book, or just read the error messages and think about what they say ? When you've fixed the trivial errors, any you're stuck on, ask a specific question with ALL The info we need ( the code snippet, the error, what you've tried, etc )
 
Share this answer
 
wrote:
#include <iostream.h>


This is not valid C++

As for the rest, you posted a TON of code, posted nothing to explain what you mean by 'fix'ing it, no way is someone going to compile this, look through it ALL and try to guess what you want done. Try posting code snippets and specific questions.
 
Share this answer
 
v2
We are not going to debug your code for you. Please ask specific questions; don't just say "my program is broken, fix it". Also, you've pasted too much code here... your sample code should be as small as possible and it should be enclosed in a PRE tag with the appropriate language specified. For example:
<pre lang="C++">int x = 5;</pre>

would produce:
C++
int x = 5;
 
Share this answer
 
Just only open Visual C++. and then copy and paste
and then f5 and then f4. it is really too difficult to do that.
i don't see the button attach files when i compose and i type here a big code. i am sorry about this problem.
 
Share this answer
 
The question is not 'is it difficult' for the person offering you free help to do all the work, it's why would we do that if you can't be bothered doing anything, you didn't even tell us what the problem was !!!
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900