A Problem In My Visual C++ Program!!

Discussion in 'Programming' started by rezax123, Jan 28, 2011.

  1. #1
    After Writting thses Code in Win32 Applincation


    #include <afxwin.h>
    
    
    class COurApp:public CWinApp
    {
    public:
    	virtual BOOL InitInstance();
    };
    
    class COurWnd:public CFrameWnd
    {
    public:
    	COurWnd()
    	{
    	Create(0, "Our Dumb MFC Application");
    	}
    };
    
    BOOL COurApp::InitInstance(void)
    {
    m_pMainWnd = new COurWnd;
    m_pMainWnd->ShowWindow(m_nCmdShow);
    reture TRUE;
    }
    COurApp AnApplication;
    
    
    Code (markup):

    I get this Error Msg:
     fatal error C1010: unexpected end of file while looking for precompiled header directive
    Code (markup):

    I m new in Visual C++. so don't know how to fix this problem.
    I m now reading "Beginning Visual C++ 6" of Ivor Horton's.
    there is some lacks in this book. some time they didn't give full picture details.
     
    rezax123, Jan 28, 2011 IP
  2. customautoblogs

    customautoblogs Member

    Messages:
    38
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    41
    #2
    You can try to include the directive: #include "stdafx.h"
     
    customautoblogs, Jan 30, 2011 IP
  3. seafrontsteve

    seafrontsteve Peon

    Messages:
    451
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #3
    If you are just starting out, my suggestion would be to move on to Visual Studio 2010 - and use Visual C++ if you need to get into low level programming, Visual Basic to get going quickly or Visual C# as a great new language that allows you to do almost as much as C++
    I stopped using VC++ 6 10 years ago and find Visual Studio much more user friendly with a vast library of apps and help files.
    The express versions of Visual Studio are completely free, or Microsoft have a new WebsiteSpark plan that offers you copies of paid versions initailly free - but you pay a couple of hundred dollars two years later, once you start to make some money
     
    seafrontsteve, Jan 30, 2011 IP
  4. rezax123

    rezax123 Member

    Messages:
    107
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    26
    #4
    Dude i know what is C# is and i used VB 6.0 in 2003 so i m familiar with this things. but i was just trying to find the mistake. i used MFC and get a fulfill program i want. and thats i didn't want here. i wanna know bout the bug in this program. and thats all. coz i follow the text book fully here. so what is the prob. i know bout C# too. its easy to learn so i m just trying to find this basic problem to get my basic more stronger.
     
    rezax123, Feb 13, 2011 IP