ADD file via upload

master
pefzt8hv9 3 years ago
parent 4a5bb5ac4a
commit f4994cec12

@ -0,0 +1,38 @@
#include <iostream>
#include <string>
using namespace std;
class Point
{
public:
void setPoint(string a,int b,string c); //<2F><><EFBFBD><EFBFBD><EFBFBD>ڶԳ<DAB6>Ա<EFBFBD><D4B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
void printPoint();
private:
string name;
int age;
string sex;
};
void Point::setPoint(string a,int b,string c) //ͨ<><CDA8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> '::' ʵ<><CAB5>setPoint<6E><74><EFBFBD><EFBFBD>
{
name=a;
age=b;
sex=c;
}
void Point::printPoint() //ʵ<><CAB5>printPoint<6E><74><EFBFBD><EFBFBD>
{
cout<< "name = " << name << endl;
cout<< "age= " << age << endl;
cout<<"sex="<<sex<<endl;
}
int main()
{
Point M;//<2F>ö<EFBFBD><C3B6><EFBFBD>õ<EFBFBD><C3B5><EFBFBD><E0B4B4>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>M
M.setPoint("<EFBFBD><EFBFBD>",18,"<EFBFBD><EFBFBD>"); //<2F><><EFBFBD><EFBFBD> M<><4D> <20><>x,yֵ
M.printPoint(); //<2F><><EFBFBD> M<><4D> <20><><EFBFBD><EFBFBD>Ϣ
return 0;
}
Loading…
Cancel
Save