I was coding a small game, when i got an error from intelisense. I tried again with a simple pet class, but intellisense didn't think it was correct. here is the code and the errors:
#include <iostream>
class Pet{
public:
int m_hunger;
void Greet();
};
void Pet::Greet(){
std::cout << "My hunger is " << m_hunger;
}
int main(){
Pet dog();
dog.m_hunger = 9;//Expression must have class type
dog.Greet();//Expression must have class type
return 0;
}