You are viewing a single comment's thread. Return to all comments →
#include <sstream> class Student { private: int age; string first_name; string last_name; int standard; public: void set_age(int age) { this->age = age; } int get_age() { return age; } void set_first_name(string first_name) { this->first_name = first_name; } string get_first_name() { return first_name; } void set_last_name(string last_name) { this->last_name = last_name; } string get_last_name() { return last_name; } void set_standard(int standard) { this->standard = standard; } int get_standard() { return standard; } string to_string() { ostringstream oss; oss << age << ',' << first_name << ',' << last_name << ',' << standard; return oss.str(); } };
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 →