1.
#include <string>
class BuckysClass{
public:
string name;
};
BuckysClass bo;
bo.name = "Bucky roberts";
cout << bo.name;
2.
class BuckysClass{
public:
void setName(string x){
name=x;
}
string getName(){
return name;
}
private:
string name;
};
BuckysClass bo;
bo.setName("Sir Buckys Wallace");
cout << bo.getName();