Whats wrong with my code? I get a expected primary-expression before "int"... for (getMaxNum) function
Heres my code:
http://ideone.com/vz9sE
Last edited on
Please use [code][/code] tags. And where is doOneSet() defined?
The function is supposed to take an int by reference.
Last edited on
This is a pretty simple fix. Up above, in your "prototype" you have your function (getMaxNum) listed as:
void getMaxNum(int& maxNum);
But below in its definition, you have it defined as this:
void getMaxNum(int maxNum)
You need to include an ampersand (&) before the "maxNum" variable. Your prototype and definition parameters must match exactly.
Last edited on