Employee Class

Employee CLASS
Last edited on
Next time, you should paste the exact error messages that you are receiving from the compiler.

"15"
This is a string literal. It is two characters, '1', and '5', and by itself, has nothing to do with a number.

15
This is an int literal. It is an actual number that can be directly used as the numbers of years. Use 15 instead of "15", if you want yearsWorked to be an integer, as your functions suggest.
Last edited on
Topic archived. No new replies allowed.