Function prototype
-
Hello, i have simple question, think of a common prototype like int FuncName(int var); now, what does it mean if i put a conclusive "=0" on it, like int FuncName(int var) = 0; Thanks in advance!
it gave me this error error C2072: 'FuncName' : initialization of a function this is declaration of a pure function of a class. that means that the implementation of the method is not in this class and must be implemented in the derived class.
I have lost more blood shaving than on the battlefield - Adolf Hitler
-
it gave me this error error C2072: 'FuncName' : initialization of a function this is declaration of a pure function of a class. that means that the implementation of the method is not in this class and must be implemented in the derived class.
I have lost more blood shaving than on the battlefield - Adolf Hitler
-
Thanks, but .. let's think that it is already implemented in a derived class, i only want to know what i does!!
Its a way to declare that the base class will not implement the function the derived class have to do it before they make object of the class. plus pure virtual functions in the base class means you cant make an object of the baseclass. There are lot of other concepts behind pure virtual functions, read some good book on it to be more clear. pure virtual functions are the foundations of COM
I have lost more blood shaving than on the battlefield - Adolf Hitler
-
Its a way to declare that the base class will not implement the function the derived class have to do it before they make object of the class. plus pure virtual functions in the base class means you cant make an object of the baseclass. There are lot of other concepts behind pure virtual functions, read some good book on it to be more clear. pure virtual functions are the foundations of COM
I have lost more blood shaving than on the battlefield - Adolf Hitler
-
Thank you for your help! But, please delete your citation of Adolf Hitler, there's nothing good associated with Adolf Hitler! It my be funny if you tell the citation once, but it is absolutely wrong to use it as a footnote!
I agree he was worst living being ever walked on the earth, but you should agree with me that he was the Best leader ever walked on the earth to motivate his people, Dont worry i will remove it soon :-) I keep changing my sig every now n then.
I have lost more blood shaving than on the battlefield - Adolf Hitler
-
Its a way to declare that the base class will not implement the function the derived class have to do it before they make object of the class. plus pure virtual functions in the base class means you cant make an object of the baseclass. There are lot of other concepts behind pure virtual functions, read some good book on it to be more clear. pure virtual functions are the foundations of COM
I have lost more blood shaving than on the battlefield - Adolf Hitler
Mr.Prakash wrote: Its a way to declare that the base class will not implement the function the derived class have to do it before they make object of the class. Though the base class can still provide an implementation that derived classes can use. Mr.Prakash wrote: pure virtual functions in the base class means you cant make an object of the baseclass. Correct. Kevin
-
Mr.Prakash wrote: Its a way to declare that the base class will not implement the function the derived class have to do it before they make object of the class. Though the base class can still provide an implementation that derived classes can use. Mr.Prakash wrote: pure virtual functions in the base class means you cant make an object of the baseclass. Correct. Kevin
Kevin McFarlane wrote: Though the base class can still provide an implementation that derived classes can use. are you sure about pure virtual functions ?
I have lost more blood shaving than on the battlefield - Adolf Hitler
-
I agree he was worst living being ever walked on the earth, but you should agree with me that he was the Best leader ever walked on the earth to motivate his people, Dont worry i will remove it soon :-) I keep changing my sig every now n then.
I have lost more blood shaving than on the battlefield - Adolf Hitler
Mr.Prakash wrote: ...you should agree with me that he was the Best leader ever walked on the earth to motivate his people, If you consider fear to be a motivator. A better leader uses love and compassion, never force. Hands down, the title of best-leader-ever-walked-on-the-earth-to-motivate-his-people goes to Christ Jesus.
-
Kevin McFarlane wrote: Though the base class can still provide an implementation that derived classes can use. are you sure about pure virtual functions ?
I have lost more blood shaving than on the battlefield - Adolf Hitler
Mr.Prakash wrote: are you sure about pure virtual functions ? Yes. There's an example somewhere in Scott Meyers's Effective C++. I don't think a similar thing is possible in Java or C# though. Kevin
-
Mr.Prakash wrote: ...you should agree with me that he was the Best leader ever walked on the earth to motivate his people, If you consider fear to be a motivator. A better leader uses love and compassion, never force. Hands down, the title of best-leader-ever-walked-on-the-earth-to-motivate-his-people goes to Christ Jesus.
DavidCrow wrote: Hands down, the title of best-leader-ever-walked-on-the-earth-to-motivate-his-people goes to Christ Jesus. correct. Some ppl will say he never existed that depends on beliver and non beliver. ok about Hitler He alone cannot spread fear, He had loyal ppl to do that, and he motivated ppl to be loyal to him. Its well know that he could move ppl emotionally with his speech. Fear was for nor german ppl.
P.R.A.K.A.S.H