#pragma once
#include "Text.h"
#include <d3d9.h>
#include <d3dx9.h>
class Graphics
{
public:
Graphics();
~Graphics();
// Initialize all graphics
HRESULT InitalizeGraphics( HWND hWnd );
// Render screen
HRESULT BeginScene();
HRESULT EndScene();
HRESULT ClearDisplay();
HRESULT Present();
void Render();
// Clean up graphics
void ShutdownGraphics();
//LPDIRECT3DDEVICE9& Get3DDevice(){return m_device.Get3DDevice();};
private:
// Issue with this
//Text m_textManager; // Text object
};
#pragma once
#include <string>
#include <list>
#include "Graphics.h"
#include <d3d9.h>
#include <d3dx9.h>
class Text
{
public:
Text();
~Text();
int CreateFont(std::string &fontName);
private:
// Why can't I declare a Graphics object.
//Graphics m_graphicsReference; //error C2146 sytax error : missing ";" befire indentifier
std::list< LPD3DXFONT > m_fonts;
LPD3DXFONT m_font;
int m_fontUID;
int GetFontUID();
};
error C2146: syntax error : missing ';' before identifier
When I declare Graphics object inside of Text I get the error.
When I declare a Text object inside of Graphics and don't decalre a Graphics object inside of Text it work.
When I declare a Text object inside of Graphics and I decalre a Graphics object inside of Text I get the error.
Some further info - Graphics is also declared by another class.
Any suggestions
Regards
Chad