-
July 22nd, 2010, 02:20 PM
#1
[C++] unexpected end-of-file found - ifndef problem?
Hello,
I am coding my applications usually as non-object oriented code. When there is big project I am getting lost, so I've decided to learn classes. I've tried to port my simple code from structurized code to OO code, but I am getting errors:
Code:
1> CApp.cpp
1>d:\tomek\projects\dxtest\dxtest\CApp.h(25): fatal error C1004: unexpected end-of-file found
1> cCamera.cpp
1>d:\tomek\projects\dxtest\dxtest\CApp.h(25): fatal error C1004: unexpected end-of-file found
1> main.cpp
1>d:\tomek\projects\dxtest\dxtest\CApp.h(25): fatal error C1004: unexpected end-of-file found
1> wndproc.cpp
1>d:\tomek\projects\dxtest\dxtest\CApp.h(25): fatal error C1004: unexpected end-of-file found
It points to the beggining of CApp.h which looks like:
Code:
#ifndef capplication_h
#define capplication_h
#include "main.h"
class cApplication {
cApplication(void);
HRESULT InitializeWindow(void);
HRESULT InitializeDirect3D(void); HRESULT InitializeGraphic();
HRESULT InitializeLight();
HRESULT InitializeMatrices();
VOID Cleanup(void);
VOID Render(void);
LPDIRECT3DDEVICE9 GetDevice(void) {return m_pd3dDevice;}
private:
HWND m_hMainWindow;
LPDIRECT3D9 m_pD3D;
LPDIRECT3DDEVICE9 m_pd3dDevice;
LPDIRECT3DVERTEXBUFFER9 m_pVB;
LPDIRECT3DTEXTURE9 m_pTexture;
};
What I am doing wrong?
-
July 22nd, 2010, 02:23 PM
#2
Re: [C++] unexpected end-of-file found - ifndef problem?
The problem was the enters after #endif.
-
July 23rd, 2010, 01:48 AM
#3
Re: [C++] unexpected end-of-file found - ifndef problem?
You can use #pragma once instead of that #idndef/#define/#endif.
-
July 23rd, 2010, 07:45 AM
#4
Re: [C++] unexpected end-of-file found - ifndef problem?
i am not able to see #endif at the end.. try to add one..
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|