int *i;
i is a pointer to an integer. What does i point to? Nothing, as we have not initialized that variable. There is no integer at that point, thus you cannot say something like *i=123; because i points to undefined memory. If you did the following:
int j;
i=&j;
but could I say
&i=&j
???
Then i is a pointer to j. You could of course dynamically allocate some memory as well:
int *i=new int;
or
int *i = malloc(sizeof(int));
ok that makes sense
The point is that
int *i;
is certainly not a shortcut for
int i;
&i;
Regarding your code excerpt, every MFC application has a class derived from CWinApp which contains the application's entry point. CWinApp is derived from CWinThread - after all, your main instance is just your application's primary thread. CWinThread contains the m_pMainWnd data member.
what do I need to include so that my source file SEES m_pMainWnd?
Dan East
[/quote]