views:

165

answers:

2
+2  A: 

Your variable is named incom, not income. income refers to a type, so the compiler gets confused and you get a syntax error when you try to compare that type against a value in line 50.

One note for bettering you programming would be to use more distinct variable names to avoid such confusions... ;)

sth
no i changed it to _incm -> but nothing changed
Wallter
You should change the name used in the comparison to be the name of the variable you want to compare.
sth
+2  A: 

income is the name of your class. _incm is the name of your variable. Perhaps you meant this (notice the use of _incm not income):

if (_incm <= 0) { cout << "the income must be greater than 0... \n" << endl; }
if (_incm > 0) { done = true; _new.setIncm(_incm); }

Frequently you use CamelCase for class names and lowercase for instance variable names. Since C++ is case-sensitive, they wouldn't conflict each other if they use different case.

Jon-Eric