We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
please anyone tell where is my error in this code ,,,, i tell you in ss<
include
include
using namespace std;
/*
Enter code for class Student here.
Read statement for specification.
*/
class student {
private:
int age;
string first_name;
string last_name;
int standard;
public:
int a ,st;
string first,last;
void set_data(int a , string first , string last , int st){
age = a;
first_name = first;
last_name = last;
standard = st;
}
int get_age(){
return age;
}
string get_first(){
return first_name;
}
string get_last(){
return last_name ;
}
int get_st(){
return standard;
}
string addall(){
stringstream ss;
ss<>addedstring;
return addedstring;
Class
You are viewing a single comment's thread. Return to all comments →
please anyone tell where is my error in this code ,,,, i tell you in ss<
include
include
using namespace std;
/* Enter code for class Student here. Read statement for specification. */ class student { private: int age; string first_name; string last_name; int standard; public: int a ,st; string first,last; void set_data(int a , string first , string last , int st){ age = a; first_name = first; last_name = last; standard = st; } int get_age(){ return age; } string get_first(){ return first_name; } string get_last(){ return last_name ; } int get_st(){ return standard; } string addall(){ stringstream ss; ss<>addedstring; return addedstring;
}; int main() {
student A; cin>>A.a; cin>>A.first; cin>>A.last; cin>>A.st; A.set_data(A.a, A.first, A.last, A.st); cout<