class Cat
{
Int itsAge;
Public:
Int getAge ();
Void setAge (int the age);
Void meow ();
}
The CPP
# include "the h
"#include
Int the Cat: : getAge ()
{
Return itsAge;
}
Void Cat: : setAge (int age)
{
ItsAge=age;
}
Void Cat: : meow ()
{
STD: : cout<" Meow. \ n ";
}
CodePudding user response:
Try in the namespace STD: : cout<CodePudding user response:
The compiler, who showed no ah?CodePudding user response:
Try to the h and iostream change, estimation is the problem here,CodePudding user response:
The h last less a semicolonCodePudding user response:
The upstairs has been resolved,The lack of a semicolon after structure declaration}
CodePudding user response:
Header file, the back of the class definition missing semicolon:The class the Cat
{
Int itsAge;
Public:
Int getAge ();
Void setAge (int the age);
Void meow ();
} ;
CodePudding user response:
Run into a similar problem is done with/*... every time." */comment out different parts to recompile again, until orientation to the location of the specific grammatical errors, "
The methods to solve of,
CodePudding user response:
You in all the header files after you've written, in the last row to add a header file: # include & lt; Iostream>;