#include <iostream>
using namespace std;
int main(void);
{
int age = 42;
switch (age) {
case 16:
cout << "Too Young";
break;
case 42:
cout << "Adult";
break;
case 70:
cout << "Senior";
break;
}
return 0;
}
use indents and the code brackets.
I keep getting this error ::
error: expected unqualified-id before ‘{’ token
I have change it to "{;" but it gives me a different error
>>59867167
>int main(void);
>;
error: expected unqualified-id before string constant
"}"
>>59867196
like this
#include <iostream>
using namespace std;
int main(void);;
{
int age = 42;
switch (age) {
case 16:
cout << "Too Young";
break;
case 42:
cout << "Adult";
break;
case 70:
cout << "Senior";
break;
}
return 0;
}
>>59867213
Dont put ";" after main
>>59867167
what resource are you using to learn ? I'm also interested in learning.
>>59867546
Thank you so much!
>>59867623
It's an android app called Sololearn Cpp
>>59867677
That's actually a decent app. I used that to refresh my mind before college