int main()
{
int num;
int x;
cout<<"Enter a number: ";
cin>>num; if (funcLetter(int num)==1)
cout<<"Number is greater than 10";
else
cout<<"Number is less than 10";
the step bolded i get an error that says "expected-primary expression before "int"
i can not figure out for the life of me why this is not compiling.
keep in mind i am 6 weeks into a beginner c++ course and just learning the syntax of the language.
(using bloodshed compiler)
When passing parameters, you don't re-declare the type, as you have already stated it is an int when you defined it above. Also, since your funcLetter() returns a bool, you can just use it in the if directly, i.e.: