You are viewing a single comment's thread. Return to all comments →
class Student{ private: int age; string first_name; string last_name; int standard; public: int get_age(){ return this->age; } void set_age(int age){ this->age = age; } string get_first_name(){ return this->first_name; } void set_first_name(string first_name){ this->first_name = first_name; } string get_last_name(){ return this->last_name; } void set_last_name(string last_name){ this->last_name = last_name; } int get_standard(){ return this->standard; } void set_standard(int standard){ this->standard = standard; } string to_string(){ return std::to_string(this->age) + "," + this->first_name + "," + this->last_name + "," + std::to_string(this->standard); } };
Seems like cookies are disabled on this browser, please enable them to open this website
Class
You are viewing a single comment's thread. Return to all comments →