Click here to Skip to main content
15,868,164 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How can I convert my project Pin
Sarath C28-Jun-06 22:29
Sarath C28-Jun-06 22:29 
AnswerRe: How can I convert my project Pin
Viorel.28-Jun-06 22:30
Viorel.28-Jun-06 22:30 
Questionclosesocket Pin
raserove28-Jun-06 22:14
raserove28-Jun-06 22:14 
AnswerRe: closesocket Pin
Sarath C28-Jun-06 22:23
Sarath C28-Jun-06 22:23 
QuestionCan't convert struct hi to Chi* Pin
kamalesh8228-Jun-06 22:02
kamalesh8228-Jun-06 22:02 
AnswerRe: Can't convert struct hi to Chi* Pin
Cedric Moonen28-Jun-06 22:12
Cedric Moonen28-Jun-06 22:12 
GeneralRe: Can't convert struct hi to Chi* Pin
Stephen Hewitt28-Jun-06 23:26
Stephen Hewitt28-Jun-06 23:26 
JokeRe: Can't convert struct hi to Chi* Pin
KarstenK29-Jun-06 0:00
mveKarstenK29-Jun-06 0:00 
You have to understand the sense behind converting data.

For instance:

class A : public B
{
}

class C //or struct
{
}

You can:
A *p = new A;
B *p1 = (B*) p; //because A inherits B !!!

you cant
B *p2 = (B*) new C;///Bullshit C isnt a B (or A)

because C is NOT a B.

You can store any data type in a void*, but you have to cast it with a legal cast to a object.

I guess you a learning working with pointers? Dead | X|


Greeting from Germany
Questionhelp me Pin
premkamalg28-Jun-06 21:34
premkamalg28-Jun-06 21:34 
AnswerRe: help me Pin
Naveen28-Jun-06 21:43
Naveen28-Jun-06 21:43 
AnswerRe: help me Pin
Hamid_RT28-Jun-06 21:55
Hamid_RT28-Jun-06 21:55 
QuestionPlz help me urgently(plzzzzzzzz) Pin
madhurgupta28-Jun-06 21:26
madhurgupta28-Jun-06 21:26 
AnswerRe: Plz help me urgently(plzzzzzzzz) Pin
Sarath C28-Jun-06 21:45
Sarath C28-Jun-06 21:45 
Questiontwo forms Pin
Desmo1628-Jun-06 21:23
Desmo1628-Jun-06 21:23 
AnswerRe: two forms Pin
Naveen28-Jun-06 21:32
Naveen28-Jun-06 21:32 
GeneralRe: two forms Pin
Desmo1628-Jun-06 22:11
Desmo1628-Jun-06 22:11 
GeneralRe: two forms Pin
Naveen28-Jun-06 22:26
Naveen28-Jun-06 22:26 
GeneralRe: two forms Pin
Desmo1628-Jun-06 22:46
Desmo1628-Jun-06 22:46 
QuestionCommand handlers difference Pin
Rupesh Shivarkar28-Jun-06 21:12
Rupesh Shivarkar28-Jun-06 21:12 
AnswerRe: Command handlers difference Pin
Viorel.28-Jun-06 22:53
Viorel.28-Jun-06 22:53 
GeneralRe: Command handlers difference Pin
Rupesh Shivarkar29-Jun-06 1:40
Rupesh Shivarkar29-Jun-06 1:40 
Questionsend and FD_WRITE [modified] Pin
followait28-Jun-06 20:58
followait28-Jun-06 20:58 
AnswerRe: send and FD_WRITE Pin
Laxman Auti28-Jun-06 21:07
Laxman Auti28-Jun-06 21:07 
GeneralRe: send and FD_WRITE [modified] Pin
followait28-Jun-06 21:39
followait28-Jun-06 21:39 
GeneralRe: send and FD_WRITE Pin
Laxman Auti28-Jun-06 22:53
Laxman Auti28-Jun-06 22:53 

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.