Click here to Skip to main content
15,901,122 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Break point not hit error in VS2005 Pin
Stefan_Lang27-Jan-11 2:33
Stefan_Lang27-Jan-11 2:33 
GeneralMessage Removed Pin
27-Jan-11 18:00
Jia10027-Jan-11 18:00 
GeneralRe: Break point not hit error in VS2005 Pin
Stefan_Lang27-Jan-11 22:34
Stefan_Lang27-Jan-11 22:34 
GeneralMessage Removed Pin
28-Jan-11 16:49
Jia10028-Jan-11 16:49 
GeneralRe: Break point not hit error in VS2005 Pin
Stefan_Lang30-Jan-11 22:59
Stefan_Lang30-Jan-11 22:59 
QuestionHow to display a image in an Activex webpage Pin
simon alec smith24-Jan-11 9:48
simon alec smith24-Jan-11 9:48 
AnswerRe: How to display a image in an Activex webpage Pin
Richard MacCutchan24-Jan-11 10:27
mveRichard MacCutchan24-Jan-11 10:27 
GeneralRe: How to display a image in an Activex webpage Pin
yindoor24-Jan-11 16:42
yindoor24-Jan-11 16:42 
GeneralRe: How to display a image in an Activex webpage Pin
Richard MacCutchan24-Jan-11 21:17
mveRichard MacCutchan24-Jan-11 21:17 
QuestionTCP/IP client / serveur and Win7 Pin
shoppinit24-Jan-11 7:52
shoppinit24-Jan-11 7:52 
AnswerRe: TCP/IP client / serveur and Win7 Pin
TheGreatAndPowerfulOz24-Jan-11 8:22
TheGreatAndPowerfulOz24-Jan-11 8:22 
GeneralRe: TCP/IP client / serveur and Win7 Pin
shoppinit24-Jan-11 9:37
shoppinit24-Jan-11 9:37 
GeneralRe: TCP/IP client / serveur and Win7 Pin
TheGreatAndPowerfulOz25-Jan-11 13:31
TheGreatAndPowerfulOz25-Jan-11 13:31 
GeneralRe: TCP/IP client / serveur and Win7 Pin
shoppinit25-Jan-11 21:55
shoppinit25-Jan-11 21:55 
AnswerRe: TCP/IP client / serveur and Win7 Pin
Richard MacCutchan24-Jan-11 10:30
mveRichard MacCutchan24-Jan-11 10:30 
Questionwhat is the type of this pointer and also object? Pin
aesthetic.crazy24-Jan-11 4:50
aesthetic.crazy24-Jan-11 4:50 
AnswerRe: what is the type of this pointer and also object? Pin
Richard MacCutchan24-Jan-11 5:06
mveRichard MacCutchan24-Jan-11 5:06 
GeneralRe: what is the type of this pointer and also object? Pin
CPallini24-Jan-11 5:30
mveCPallini24-Jan-11 5:30 
GeneralRe: what is the type of this pointer and also object? Pin
aesthetic.crazy25-Jan-11 0:08
aesthetic.crazy25-Jan-11 0:08 
GeneralRe: what is the type of this pointer and also object? Pin
Richard MacCutchan25-Jan-11 2:31
mveRichard MacCutchan25-Jan-11 2:31 
AnswerRe: what is the type of this pointer and also object? PinPopular
Aescleal24-Jan-11 5:37
Aescleal24-Jan-11 5:37 
The type of the pointer is determined by the left hand side of the expression. The type of the created object is determined by the right hand side of the expression.

One interesting thing about C++ and C (to a lesser extent) is that when you declare a pointer you're not saying "this variable is a pointer to fixed class" but you're saying "this variable is a pointer to something with an interface of this type." In c this really only shows up when you convert to and from void * but in C++ it crops up a lot more (it's how C++ implements substitutability, AKA the Liskov Principle).

From this lot, when you write the expression:

A *p = new B;


you're saying two things to the compiler "p is a pointer to something with the interface of A" and "initialise that pointer with the address of a dynamically allocated B."

Cheers,

Ash
GeneralRe: what is the type of this pointer and also object? Pin
Chris Meech24-Jan-11 9:47
Chris Meech24-Jan-11 9:47 
QuestionApplication Error Pin
shiv@nand24-Jan-11 0:34
shiv@nand24-Jan-11 0:34 
AnswerRe: Application Error Pin
Hans Dietrich24-Jan-11 0:48
mentorHans Dietrich24-Jan-11 0:48 
GeneralRe: Application Error Pin
shiv@nand24-Jan-11 1:01
shiv@nand24-Jan-11 1:01 

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.