Click here to Skip to main content
15,906,333 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: New In c and c++. Downloading data from a server Pin
Eli Nurman16-Jun-10 6:14
Eli Nurman16-Jun-10 6:14 
GeneralRe: New In c and c++. Downloading data from a server Pin
Maximilien16-Jun-10 6:56
Maximilien16-Jun-10 6:56 
AnswerRe: New In c and c++. Downloading data from a server Pin
David Crow16-Jun-10 5:10
David Crow16-Jun-10 5:10 
AnswerRe: New In c and c++. Downloading data from a server Pin
Aescleal16-Jun-10 7:48
Aescleal16-Jun-10 7:48 
AnswerRe: New In c and c++. Downloading data from a server Pin
ThatsAlok17-Jun-10 0:00
ThatsAlok17-Jun-10 0:00 
GeneralRe: New In c and c++. Downloading data from a server Pin
Eli Nurman17-Jun-10 1:37
Eli Nurman17-Jun-10 1:37 
Questionimplicit cast between pointers Pin
Iosif Murariu16-Jun-10 3:01
Iosif Murariu16-Jun-10 3:01 
AnswerRe: implicit cast between pointers PinPopular
Cedric Moonen16-Jun-10 3:06
Cedric Moonen16-Jun-10 3:06 
Why do you want to do something like that ? A and B are two completely different classes so, why do you want to be able to pass a B to a function expecting an A object ? It's a bit like asking how can I convert an apple to a car, it doesn't make any sense.
If the objects are related in some way, then I would suggest that they have a common base class and that your function expect a pointer to the base class. Then you can pass a pointer to an instance of A or a pointer to an instance of B but the function will treat them as a pointer to the base class.

But if the class are unrelated, I think you are making a very bad design decision.
Cédric Moonen
Software developer

Charting control [v3.0]
OpenGL game tutorial in C++

GeneralRe: implicit cast between pointers Pin
Iosif Murariu16-Jun-10 3:11
Iosif Murariu16-Jun-10 3:11 
GeneralRe: implicit cast between pointers Pin
Iosif Murariu16-Jun-10 3:13
Iosif Murariu16-Jun-10 3:13 
GeneralRe: implicit cast between pointers Pin
CPallini16-Jun-10 3:19
mveCPallini16-Jun-10 3:19 
GeneralRe: implicit cast between pointers Pin
Cedric Moonen16-Jun-10 3:20
Cedric Moonen16-Jun-10 3:20 
GeneralRe: implicit cast between pointers Pin
Iosif Murariu16-Jun-10 3:30
Iosif Murariu16-Jun-10 3:30 
GeneralRe: implicit cast between pointers Pin
Cedric Moonen16-Jun-10 3:39
Cedric Moonen16-Jun-10 3:39 
GeneralRe: implicit cast between pointers Pin
Iosif Murariu16-Jun-10 3:42
Iosif Murariu16-Jun-10 3:42 
GeneralRe: implicit cast between pointers Pin
Cedric Moonen16-Jun-10 3:50
Cedric Moonen16-Jun-10 3:50 
GeneralRe: implicit cast between pointers Pin
Iosif Murariu16-Jun-10 3:58
Iosif Murariu16-Jun-10 3:58 
AnswerRe: implicit cast between pointers Pin
CPallini16-Jun-10 3:15
mveCPallini16-Jun-10 3:15 
AnswerRe: implicit cast between pointers Pin
Nemanja Trifunovic16-Jun-10 4:12
Nemanja Trifunovic16-Jun-10 4:12 
GeneralRe: implicit cast between pointers Pin
Iosif Murariu16-Jun-10 4:19
Iosif Murariu16-Jun-10 4:19 
GeneralRe: implicit cast between pointers Pin
Iosif Murariu16-Jun-10 4:23
Iosif Murariu16-Jun-10 4:23 
AnswerRe: implicit cast between pointers Pin
Iosif Murariu16-Jun-10 4:46
Iosif Murariu16-Jun-10 4:46 
GeneralRe: implicit cast between pointers Pin
CPallini16-Jun-10 6:11
mveCPallini16-Jun-10 6:11 
GeneralRe: implicit cast between pointers Pin
Iosif Murariu16-Jun-10 20:25
Iosif Murariu16-Jun-10 20:25 
GeneralRe: implicit cast between pointers Pin
Aescleal16-Jun-10 7:45
Aescleal16-Jun-10 7:45 

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.