class CBase { virtual CBase* func1(int,char); }; class CDerived:public CBase { CDerived *func1(int,char); }; I complier codes in VC 6.0 and diplay follow error: error C2555: 'CDerived::func1' : overriding virtual function differs from 'CBase::func1' only by return type or calling convention because CDerived derived from CBase, I think CDerived::func1 can return CDerived's pointer.do you think so ? your friend:bobi
bobi_zcl
Posts
-
about virtual function's return type -
about virtual function's return typeyes,I think you have understand, I want to know it is right that virtual functions's returns types can be different only if both returns have base and derived relation ship,but follow codes is error in Visual C++ 6.0: class CBase { virtual CBase* func1(int,char); }; class CDerived:public CBase { CDerived *func1(int,char); }; can you tell me why? your friend:bobi
-
about virtual function's return typeHi:this is my codes: class CIPerson { int m_nID; }; class CStudent:public CIPerson { int m_nOld; }; class CIPersonInfo { virtual CIPerson & search()=0; }; class CStudentInfo:public CIPersonInfo { CStudent & search(){} }; can you tell me why "CStudent & search(){}" is error?CStudent is derived from CIPerson your friend:bobi
-
Remove all breakpointHi,everyone: Could you tell how to remove all my program's breakpoint in Visual C++ 6.0? thank you! your friend:bobi
-
constructor and copy constructorHi,my class definement is as follows: class A { public: A(){cout<<"A::A()"<
-
fun(char*) and fun(char)oH,dear: I try calling fun(0L),the compiler compile successfully and select fun(int) still. your friend:bobi
-
fun(char*) and fun(char)Hi: I overload funcion fun(char) and fun(char*),when I call fun(0),the compiler said:" ambiguous called ....",but when I call fun(1),the compiler will select fun(char).why? I also define fun(int) and fun(int*),to my surprise,I call fun(0) in the same way. The compiler compile successfully and select fun(int),Why? your friend:bobi
-
function overload problem:(char) and (char*)I can understand.but I define another two:fun(int) and fun(int*),then I call fun(0),the compiler will compile successfully, and fun(0) will select fun(int) instead of fun(int*).why? thank your suggestion,I will go to the visual C++ forum. your friend:bobi
-
function overload problem:(char) and (char*)I call fun(0),the compiler display message "ambiguous call...",when I call fun(1)(passing a value which is not zero),the compiler call fun(char),why?? your friend:bobi
-
function overload problem:(char) and (char*)I still havn't understand what you said,Can you explain? your friend:bobi
-
function overload problem:(char) and (char*)Hi,everyone: I write two function: void fun(char) and void fun(char*).when I call fun(0),the compiler display message"ambiguous call to overloaded function";but,I call fun(1),the compiler call fun(char). Anyone can tell me how to explain it? your friend:bobi
-
Looking to simplify my lifehello: I am very interested in your project.I have use MSVC 6 for five years, and develope many product with it. one of these products is a Integrate Development Enviroment for a software platform. so I want to cooperate with you. OK? your friend:bobi
-
What is "standalone" mode in linuxthe "STANDALONE_DEBUG" is a precompile macro, so I guess it is defined in compiling option. there is a property about standalone in XML,so i think standalone is a debug mode. your friend:bobi
-
What is "standalone" mode in linuxHi, I see the macro "STANDALONE_DEBUG" in source code of uClinux recently,so I want know what it means. thank!:) your friend:bobi
-
About WinCEI am developing software on WinCE, but I don't know what 'CE' of WinCE mean? thank you! your friend:bobi
-
Syncing a single VSS database across several machinesVisual SourceSafe is client/server architecture.so I think that you'd better build vss server which the notebook access on your desktop machine your friend:bobi
-
programming a 8031 microcontroller in CDo you know how to connect 8031 to pc' serial port? if you do,I think this is easy to convert hex into ascii.otherwise,I suggest you can learn about 8031's datasheet at first. your friend:bobi
-
OnDraw() troubles....what's mean "with a CButton array",which class does th OnDraw() method belong to? your friend:bobi
-
Bitmap on Menu BarMickael Dunn'advice is good.but I think there must be a method to do it by using member's function of menu class in MFC.you can refer to Microsoft Internet Explorer, bitmap lies of left of the items in "favourite" your friend:bobi
-
Do you still develop by Visual C++ 6.0?I agree with you! Do you think how long the VS 6.0 will replace with .NET entirely? thank you very much your friend:bobi