根据下面的程序,可以在主程序中使用的合法语句是( )。 #include <io
题型:单项选择题
问题:
根据下面的程序,可以在主程序中使用的合法语句是( )。
#include <iostream>
using namespace std;
class Person
int age;
voidtest()
public:
Person(intage)this->age=age;
void ShowAge()cout<<"the Person’s age is",<<age;
;
void main()
Person wang(23);
A.wang.age=45
B.wang.wang(45)
C.wang.ShowAge()
D.wang.test()