Click here to Skip to main content
15,921,113 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
GeneralRe: Class Design tool Pin
Shiva Prasad7-Sep-05 20:47
Shiva Prasad7-Sep-05 20:47 
GeneralRe: Class Design tool Pin
toxcct7-Sep-05 20:49
toxcct7-Sep-05 20:49 
Questionreg: inheritance Pin
mcnu7-Sep-05 6:11
mcnu7-Sep-05 6:11 
AnswerRe: reg: inheritance Pin
Christian Graus7-Sep-05 13:18
protectorChristian Graus7-Sep-05 13:18 
GeneralRe: reg: inheritance Pin
Cedric Moonen7-Sep-05 21:18
Cedric Moonen7-Sep-05 21:18 
GeneralRe: reg: inheritance Pin
Christian Graus8-Sep-05 12:06
protectorChristian Graus8-Sep-05 12:06 
AnswerRe: reg: inheritance Pin
Cedric Moonen7-Sep-05 21:31
Cedric Moonen7-Sep-05 21:31 
GeneralRe: reg: inheritance Pin
mcnu8-Sep-05 2:22
mcnu8-Sep-05 2:22 
i feel your correct and i wrote what you said i added one new parameter in <B>st_Mark_Det<B> constructor to intialize the member varible in the <B>st_Det<B> and that not giving any errors.
and my atual error is what i said earlier

after compiling my program it gives compiler error like this <B> st_Mark_Det must be previously defined class or sturuct<B>

#include <iostream.h>
#include <conio.h>
class st_Det
{
protected:
int rol_no;
public:
//st_Det(){}
// st_Det(int a){rol_no=a;}
void put_No(void){ cout<<"\nRoll No :"<<rol_no<<endl;}
};

class st_Mark_Det:public st_Det
{
protected:
float sub1,sub2;
public:
// st_Mark_Det(){}
st_Mark_Det(float a,float b,float c){rol_no=a;sub1=a;sub2=b;}
void put_Mark(void){cout<<"\nMarks\n SUBJECT1 "<<sub1<<"\nSUBJECT2 "<<sub2;
};


class st_Sprt
{
protected:
float score;
public:
st_Sprt(float a){score=a;}
void put_Score(void){cout<<"\nScore In Sports\n"<<score<<endl;}
};

class result:public st_Mark_Det,public st_Sprt
{
float total;
public:
result(int a,float b,float c,float d):st_Mark_Det(a,b,c),st_Sprt(d)
{total=0;}
float sum(){total=sub1+sub2+score;}
void display (void){ put_No();put_Mark();put_Score();cout<<sum();}
};
int main()
{

cout<<"\nEnter Student Roll NO:\t";int a;cin>>a;
cout<<"\nEnter Marks In tow subjects";float b,c;
cin>>b>>c;
cout<<"\nEnter Score In Sports :\t";float d;cin>>d;
result s1(a,b,c,d);
result.display();
getch();
return 0;
}


Regards
cnu...
GeneralRe: reg: inheritance Pin
Cedric Moonen8-Sep-05 2:27
Cedric Moonen8-Sep-05 2:27 
GeneralRe: reg: inheritance Pin
Cedric Moonen8-Sep-05 2:38
Cedric Moonen8-Sep-05 2:38 
GeneralRe: reg: inheritance Pin
8-Sep-05 2:44
suss8-Sep-05 2:44 
GeneralThanks cedric monen Pin
8-Sep-05 3:28
suss8-Sep-05 3:28 
GeneralRe: Thanks cedric monen Pin
Cedric Moonen8-Sep-05 4:21
Cedric Moonen8-Sep-05 4:21 
Questionstroe windows form as a bitmap file?? Pin
richiemac7-Sep-05 4:38
richiemac7-Sep-05 4:38 
AnswerRe: store windows form as a bitmap file?? Pin
ursus zeta13-Sep-05 12:23
ursus zeta13-Sep-05 12:23 
QuestionHow do I store object files as a library?? Pin
BenPage7-Sep-05 3:20
BenPage7-Sep-05 3:20 
AnswerRe: How do I store object files as a library?? Pin
Cedric Moonen7-Sep-05 23:12
Cedric Moonen7-Sep-05 23:12 
QuestionHow to convert type String* to unsigned char * In vc++.NET(Managed)? Pin
CooperWu5-Sep-05 22:29
CooperWu5-Sep-05 22:29 
AnswerRe: How to convert type String* to unsigned char * In vc++.NET(Managed)? Pin
S. Senthil Kumar6-Sep-05 7:58
S. Senthil Kumar6-Sep-05 7:58 
QuestionRe: How to convert type String* to unsigned char * In vc++.NET(Managed)? Pin
CooperWu6-Sep-05 15:26
CooperWu6-Sep-05 15:26 
QuestionReplacing text? Pin
Lord Kixdemp5-Sep-05 11:57
Lord Kixdemp5-Sep-05 11:57 
AnswerRe: Replacing text? Pin
Christian Graus5-Sep-05 12:15
protectorChristian Graus5-Sep-05 12:15 
AnswerRe: Replacing text? Pin
toxcct5-Sep-05 21:32
toxcct5-Sep-05 21:32 
GeneralRe: Replacing text? Pin
Lord Kixdemp7-Sep-05 11:21
Lord Kixdemp7-Sep-05 11:21 
GeneralRe: Replacing text? Pin
toxcct7-Sep-05 20:30
toxcct7-Sep-05 20:30 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.