Why doesnt this code work I have been following examples from a book I have and some of the functions in it are undefined by my compiler. I am compiling from Microsoft Visual Studio Ultimate and it still wont pick this one up. I just want to learn MFCs but, its like im programming in another language with no rules.
Heres the cpp
#include <afxwin.h>
#include "header.h"
CMyApp myApp;
BOOL CMyApp::InitInstance()
{
m_pMainWindow = new CMainWindow; //the compiler doesnt seem to like this
m_pMainWnd->ShowWindow(m_nCmdShow); // or the parameter in here
m_pMainWnd->UpdateWindow();
return TRUE;
}
@kbw It doesnt run I put comments inside to tell what the compiler took and what it didnt.
@modoran I could do that just to analyze the flow of MFCs and im probably going to ditch the book I have and get petzolds book this was literally one of the first examples in the book.