expected unqualified ID before'.' token
I keep running into this issue, all the information Ive searched for regarding this error have been in regards to nesting classes and other issues. Here's some example code:
Code:
#include <iostream>
using namespace std;
class Chef
{
public:
void makechicken()
{
cout<<"The chef makes chicken"<<endl;
}
void makeSalad()
{
cout<<"The chef makes salad"<<endl;
}
void makeSpecialDish()
{
cout<<"The chef makes bbq ribs"<<endl;
}
};
int main()
{
Chef chicken;
Chef.makeChicken();
return 0;
}
Can someone please explain this error and what I'm doing wrong, I went over a few tutorials I watched originally, when I started learning c++, and this usage seems to be correct. Help please.