示例代码:
#include <iostream>
#include <string>
using namespace std;
class Car {
public:
string strname;
int nseats;
};
string getname(Car c);
int getseats(Car c);
int main() {
Car c;
cout <<"您的汽车名称:"<<getname(c)<<endl;
cout <<"汽车座位数量:"<<getseats(c)<<endl