Click here to Skip to main content
14,766,926 members
Home » Discussions » C / C++ / MFC
   

C / C++ / MFC

 
Questionclass instance address Pin
transoft4-Feb-10 11:46
Membertransoft4-Feb-10 11:46 
AnswerRe: class instance address Pin
Abhi Lahare4-Feb-10 11:54
MemberAbhi Lahare4-Feb-10 11:54 
GeneralRe: class instance address Pin
transoft4-Feb-10 12:05
Membertransoft4-Feb-10 12:05 
GeneralRe: class instance address Pin
Graham Breach4-Feb-10 12:24
MemberGraham Breach4-Feb-10 12:24 
GeneralRe: class instance address Pin
transoft4-Feb-10 12:30
Membertransoft4-Feb-10 12:30 
GeneralRe: class instance address Pin
Avi Berger4-Feb-10 12:42
MemberAvi Berger4-Feb-10 12:42 
GeneralRe: class instance address Pin
transoft4-Feb-10 13:09
Membertransoft4-Feb-10 13:09 
AnswerRe: class instance address Pin
Avi Berger4-Feb-10 12:31
MemberAvi Berger4-Feb-10 12:31 
First, you need a semi-colon at the end of your class definition.

class A {};


Next,

transoft wrote:
A* pA = new A;


pA is a variable that you have assigned the address of a dynamically created instance of A. So you have already accomplished what you were asking about.

So from your other message it would be:

std::vector<void*> classAddress;
classAddress.pushback(pA);

However, this will raise peoples hackles as you generally don't want to play with void *'s if yo don't have to.

Perhaps you might ask about what it is you hope to achieve.
QuestionDos subclassing Pin
aurelcly4-Feb-10 9:14
Memberaurelcly4-Feb-10 9:14 
QuestionRe: Dos subclassing Pin
David Crow4-Feb-10 9:27
MemberDavid Crow4-Feb-10 9:27 
AnswerRe: Dos subclassing Pin
Maximilien4-Feb-10 9:38
MemberMaximilien4-Feb-10 9:38 
AnswerRe: Dos subclassing Pin
Richard MacCutchan4-Feb-10 9:48
mveRichard MacCutchan4-Feb-10 9:48 
AnswerRe: Dos subclassing Pin
Code-o-mat4-Feb-10 9:50
MemberCode-o-mat4-Feb-10 9:50 
AnswerRe: Dos subclassing Pin
Avi Berger4-Feb-10 10:13
MemberAvi Berger4-Feb-10 10:13 
GeneralRe: Dos subclassing Pin
loyal ginger4-Feb-10 12:16
Memberloyal ginger4-Feb-10 12:16 
GeneralRe: Dos subclassing Pin
Avi Berger4-Feb-10 13:42
MemberAvi Berger4-Feb-10 13:42 
QuestionDeclaring Variables Pin
gregarion4-Feb-10 8:48
Membergregarion4-Feb-10 8:48 
AnswerRe: Declaring Variables Pin
Maximilien4-Feb-10 9:19
MemberMaximilien4-Feb-10 9:19 
GeneralRe: Declaring Variables Pin
gregarion4-Feb-10 9:34
Membergregarion4-Feb-10 9:34 
GeneralRe: Declaring Variables Pin
Richard MacCutchan4-Feb-10 9:47
mveRichard MacCutchan4-Feb-10 9:47 
GeneralRe: Declaring Variables Pin
gregarion4-Feb-10 9:53
Membergregarion4-Feb-10 9:53 
GeneralRe: Declaring Variables Pin
Richard MacCutchan4-Feb-10 12:38
mveRichard MacCutchan4-Feb-10 12:38 
GeneralRe: Declaring Variables Pin
Rozis4-Feb-10 13:42
MemberRozis4-Feb-10 13:42 
GeneralRe: Declaring Variables Pin
Richard MacCutchan4-Feb-10 23:04
mveRichard MacCutchan4-Feb-10 23:04 
GeneralRe: Declaring Variables Pin
Maximilien4-Feb-10 9:55
MemberMaximilien4-Feb-10 9:55 

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.