I just started c++ like a week ago and not sure how to solve this error! I'm not sure if I have declared the job variable correctly...so if it is the mistake plz tell me how to declare it! If the input for cin>>job is none I want the if statement to be true and the output to be "Accepted!"
#include <iostream>
using namespace std;
int main()
{
int age;
char job;
cout<<"Enter your age:";
cin >> age;
cout<<"\n";
cout<<"Enter your job:";
cin>>job;
cout<<"\n";
if (age > 18 && age < 60 && job == none ) {
cout << "Accepted!" << endl;
}
return 0;
}
ERROR message:
./Playground/file0.cpp: In function 'int main()':
./Playground/file0.cpp:16:40: error: 'none' was not declared in this scope
16 | if (age > 18 && age < 60 && job == none ) {
| ^~~~