Click here to Skip to main content
16,019,983 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
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 
QuestionAccess violation for CWinThread Pin
sksksksksksksks15-Apr-10 0:12
sksksksksksksks15-Apr-10 0:12 
AnswerRe: Access violation for CWinThread Pin
CPallini15-Apr-10 0:24
mveCPallini15-Apr-10 0:24 
AnswerRe: Access violation for CWinThread Pin
Cedric Moonen15-Apr-10 1:06
Cedric Moonen15-Apr-10 1:06 
AnswerRe: Access violation for CWinThread Pin
Rajesh R Subramanian15-Apr-10 4:24
professionalRajesh R Subramanian15-Apr-10 4:24 
GeneralRe: Access violation for CWinThread Pin
CPallini15-Apr-10 7:35
mveCPallini15-Apr-10 7:35 
GeneralRe: Access violation for CWinThread Pin
Moak15-Apr-10 8:21
Moak15-Apr-10 8:21 
GeneralRe: Access violation for CWinThread Pin
CPallini15-Apr-10 8:53
mveCPallini15-Apr-10 8: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.