Click here to Skip to main content
15,915,789 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Creating Log files in C/C++ Pin
CPallini17-Apr-08 23:08
mveCPallini17-Apr-08 23:08 
GeneralRe: Creating Log files in C/C++ Pin
Hamid_RT17-Apr-08 21:32
Hamid_RT17-Apr-08 21:32 
GeneralRe: Creating Log files in C/C++ Pin
ThatsAlok18-Apr-08 4:00
ThatsAlok18-Apr-08 4:00 
GeneralRe: Creating Log files in C/C++ Pin
Hamid_RT18-Apr-08 5:28
Hamid_RT18-Apr-08 5:28 
GeneralRe: Creating Log files in C/C++ Pin
ThatsAlok18-Apr-08 5:51
ThatsAlok18-Apr-08 5:51 
GeneralRe: Creating Log files in C/C++ Pin
Hamid_RT18-Apr-08 6:05
Hamid_RT18-Apr-08 6:05 
GeneralRe: Creating Log files in C/C++ Pin
ThatsAlok18-Apr-08 3:56
ThatsAlok18-Apr-08 3:56 
Questionerror C2440: 'initializing' : cannot convert from 'class base *' to 'class Derived *' Pin
C.P.Rajesh17-Apr-08 21:09
C.P.Rajesh17-Apr-08 21:09 
In the program below if i try to convert derived class pointer to base with '=' operator overloaded the overloaded operator is not considered. Can somebody please explain what is wrong in the below code?

class base
{
// dummy
};

class Derived : public base
{
public:
Derived* operator= (base* aBase)
{
return (Derived*) aBase;
}
};

int main(int argc, char* argv[])
{

base* bb = new Derived;
Derived* dd = bb; // Compilation error C2440

return 0;
}
GeneralRe: error C2440: 'initializing' : cannot convert from 'class base *' to 'class Derived *' Pin
Cedric Moonen17-Apr-08 21:20
Cedric Moonen17-Apr-08 21:20 
GeneralRe: error C2440: 'initializing' : cannot convert from 'class base *' to 'class Derived *' Pin
C.P.Rajesh17-Apr-08 21:30
C.P.Rajesh17-Apr-08 21:30 
QuestionRe: error C2440: 'initializing' : cannot convert from 'class base *' to 'class Derived *' Pin
CPallini17-Apr-08 21:46
mveCPallini17-Apr-08 21:46 
GeneralRe: error C2440: 'initializing' : cannot convert from 'class base *' to 'class Derived *' Pin
Naveen17-Apr-08 21:23
Naveen17-Apr-08 21:23 
GeneralRe: error C2440: 'initializing' : cannot convert from 'class base *' to 'class Derived *' Pin
C.P.Rajesh17-Apr-08 21:33
C.P.Rajesh17-Apr-08 21:33 
GeneralRe: error C2440: 'initializing' : cannot convert from 'class base *' to 'class Derived *' Pin
Naveen17-Apr-08 21:46
Naveen17-Apr-08 21:46 
GeneralRe: error C2440: 'initializing' : cannot convert from 'class base *' to 'class Derived *' Pin
CPallini17-Apr-08 21:48
mveCPallini17-Apr-08 21:48 
GeneralRe: error C2440: 'initializing' : cannot convert from 'class base *' to 'class Derived *' Pin
Naveen17-Apr-08 21:55
Naveen17-Apr-08 21:55 
GeneralRe: error C2440: 'initializing' : cannot convert from 'class base *' to 'class Derived *' Pin
CPallini17-Apr-08 22:48
mveCPallini17-Apr-08 22:48 
GeneralRe: error C2440: 'initializing' : cannot convert from 'class base *' to 'class Derived *' Pin
Naveen17-Apr-08 22:58
Naveen17-Apr-08 22:58 
GeneralRe: error C2440: 'initializing' : cannot convert from 'class base *' to 'class Derived *' Pin
CPallini17-Apr-08 21:45
mveCPallini17-Apr-08 21:45 
GeneralRe: error C2440: 'initializing' : cannot convert from 'class base *' to 'class Derived *' [modified] Pin
C.P.Rajesh17-Apr-08 21:55
C.P.Rajesh17-Apr-08 21:55 
GeneralRe: error C2440: 'initializing' : cannot convert from 'class base *' to 'class Derived *' Pin
CPallini17-Apr-08 22:55
mveCPallini17-Apr-08 22:55 
GeneralRe: error C2440: 'initializing' : cannot convert from 'class base *' to 'class Derived *' Pin
C.P.Rajesh17-Apr-08 23:24
C.P.Rajesh17-Apr-08 23:24 
GeneralRe: error C2440: 'initializing' : cannot convert from 'class base *' to 'class Derived *' Pin
jhwurmbach18-Apr-08 2:26
jhwurmbach18-Apr-08 2:26 
QuestionHow to Change the Font Dynamically on button control Pin
phanindra varma17-Apr-08 20:39
phanindra varma17-Apr-08 20:39 
AnswerRe: How to Change the Font Dynamically on button control Pin
Hamid_RT17-Apr-08 21:00
Hamid_RT17-Apr-08 21:00 

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.