-4
#include<iostream>
using namespace std ;
class studentpersonal{
protected :
int rollno ,age ;
string name , sex;
public:
studentpersonal(int rollno, int age , string name, string gender)
{
cout<<"NAME IS : "<<name;
cout<<"\nID IS : "<<rollno;
cout<<"\nAGE IS : "<<age;
cout<<"\nGENDER IS : "<<gender;
}
};
class studentmarks : public studentpersonal{
public:
studentmarks(int mark1 , int mark2 ,int mark3, int mark4)
{
/*cout<<"marks 1 "<<mark1;
cout<<"marks 2 "<<mark2;
cout<<"marks 3 "<<mark3;
cout<<"marks 4 "<<mark3 ;*/
}
};
main(){
studentpersonal ob(6709,19,"WASSAUF","MALE");
studentmarks ob1(90,95,97,91);
}
得到一個沒有函數調用的錯誤,我該怎麼辦?我收到錯誤的「沒有任何功能的呼叫」。給我的解決方案
在你的標題中放上必要的「給我解決方案」實在不是一個好主意。 – chris 2015-04-03 16:03:41