#include <iostream>
#include <string>
using namespace std;
class Info
{
private:
string name;
int age;
public:
void SetData(string n, int a)
{
name = n;
age = a;
}
void Show()
{
cout << "이름: " << name << endl;
cout << "나이: " << age << endl;
}
};
int main()
{
Info info;
info.SetData("홍길동", 20);
info.Show();
return 0;
}
To embed this project on your website, copy the following code and paste it into your website's HTML: