Click here to Skip to main content
15,891,902 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Worker Thread GUI Pin
Eugen Podsypalnikov16-Apr-10 2:15
Eugen Podsypalnikov16-Apr-10 2:15 
GeneralRe: Worker Thread GUI Pin
MsmVc16-Apr-10 2:40
MsmVc16-Apr-10 2:40 
AnswerRe: Worker Thread GUI Pin
Keith Worden19-Apr-10 3:34
Keith Worden19-Apr-10 3:34 
QuestionListView Drag event ----LVN_BEGINDRAG Pin
arun_pk15-Apr-10 22:04
arun_pk15-Apr-10 22:04 
Questionany Concepto Pin
Yonathan111115-Apr-10 21:24
professionalYonathan111115-Apr-10 21:24 
AnswerRe: any Concepto Pin
CPallini15-Apr-10 21:49
mveCPallini15-Apr-10 21:49 
AnswerRe: any Concepto Pin
Adam Roderick J15-Apr-10 22:19
Adam Roderick J15-Apr-10 22:19 
AnswerRe: any Concepto Pin
«_Superman_»16-Apr-10 7:20
professional«_Superman_»16-Apr-10 7:20 
QuestionHow could I write my xml document with indention By MSMXL Pin
m_code15-Apr-10 21:17
m_code15-Apr-10 21:17 
AnswerRe: How could I write my xml document with indention By MSMXL Pin
Maximilien16-Apr-10 2:48
Maximilien16-Apr-10 2:48 
QuestionResorce file ....Custom Cursor Pin
ForNow15-Apr-10 21:09
ForNow15-Apr-10 21:09 
QuestionHow to uninstall all modified files from previous setup installation Pin
Chesnokov Yuriy15-Apr-10 20:08
professionalChesnokov Yuriy15-Apr-10 20:08 
QuestionAbout pointer assignment [modified] Pin
milestanley15-Apr-10 15:31
milestanley15-Apr-10 15:31 
AnswerRe: About pointer assignment [modified] Pin
Richard Andrew x6415-Apr-10 16:31
professionalRichard Andrew x6415-Apr-10 16:31 
AnswerRe: About pointer assignment PinPopular
Gwenio15-Apr-10 16:31
Gwenio15-Apr-10 16:31 
If I understand what you are asking, then it should be something like this:

- a.h
class ClassOne {
    //stuff
    void SetRef();
    //more stuff
};
static ClassOne* one;


- a.cpp
one(0);
inline void ClassOne::SetRef() {one = this;}


Your problems are:
- "this" is only valid inside class member methods.
- You do not need to have "ClassOne::" infront of "one" unless it is a static member of the class (it is declared within the scope of the class).

If "one" is a static member, this a.cpp would be as follows:
ClassOne * ClassOne::one(0);
inline void ClassOne::SetRef() {ClassOne::one = this;}

AnswerRe: About pointer assignment Pin
Emilio Garavaglia15-Apr-10 20:46
Emilio Garavaglia15-Apr-10 20:46 
AnswerRe: About pointer assignment Pin
KarstenK15-Apr-10 21:49
mveKarstenK15-Apr-10 21:49 
QuestionBinary Tree Help-how to display a tree hierarchy Pin
Member 382253215-Apr-10 14:35
Member 382253215-Apr-10 14:35 
AnswerRe: Binary Tree Help-how to display a tree hierarchy Pin
Gwenio15-Apr-10 15:23
Gwenio15-Apr-10 15:23 
GeneralRe: Binary Tree Help-how to display a tree hierarchy Pin
Member 382253215-Apr-10 15:52
Member 382253215-Apr-10 15:52 
QuestionWinHelp for Mobile Windows CE 6.0 Pin
Software200715-Apr-10 8:55
Software200715-Apr-10 8:55 
AnswerRe: WinHelp for Mobile Windows CE 6.0 Pin
Eugen Podsypalnikov15-Apr-10 20:17
Eugen Podsypalnikov15-Apr-10 20:17 
QuestionHow to combine Menu and toolbar to one line? Pin
Software200715-Apr-10 6:05
Software200715-Apr-10 6:05 
AnswerRe: How to combine Menu and toolbar to one line? Pin
Iain Clarke, Warrior Programmer15-Apr-10 6:16
Iain Clarke, Warrior Programmer15-Apr-10 6:16 
AnswerRe: How to combine Menu and toolbar to one line? Pin
«_Superman_»15-Apr-10 7:08
professional«_Superman_»15-Apr-10 7:08 

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.