dodle
December 2nd, 2012, 07:33 AM
I can't figure out why I can't access my class "Layout":
main.h:
#include <wx/wx.h>
#include "layout.h"
class MainWindow : public wxFrame
{
public:
MainWindow(const wxString & title);
private:
wxPanel *bg;
Layout *layout;
};
layout.h:
#include <wx/wx.h>
#include <wxSVG/svgctrl.h>
#include "groups.h"
class Layout
{
public:
Layout(wxPanel &parent);
void SetLayout(int letter, std::vector<Set> group);
private:
wxSVGCtrl *ImageDisplay;
wxStaticText *TextDisplay;
wxStaticText *LetterDisplay;
};
I can't figure out what I'm doing wrong.
Output:
g++ -c -O9 -o main.o main.cpp "-I/c/Development/Libraries/wx-2.9/include"
In file included from main.cpp:1:0:
main.h:13:5: error: 'Layout' does not name a type
main.cpp: In constructor 'MainWindow::MainWindow(const wxString&)':
main.cpp:19:5: error: 'layout' was not declared in this scope
main.cpp:19:18: error: expected type-specifier before 'Layout'
main.cpp:19:18: error: expected ';' before 'Layout'
make: *** [main.o] Error 1
main.h:
#include <wx/wx.h>
#include "layout.h"
class MainWindow : public wxFrame
{
public:
MainWindow(const wxString & title);
private:
wxPanel *bg;
Layout *layout;
};
layout.h:
#include <wx/wx.h>
#include <wxSVG/svgctrl.h>
#include "groups.h"
class Layout
{
public:
Layout(wxPanel &parent);
void SetLayout(int letter, std::vector<Set> group);
private:
wxSVGCtrl *ImageDisplay;
wxStaticText *TextDisplay;
wxStaticText *LetterDisplay;
};
I can't figure out what I'm doing wrong.
Output:
g++ -c -O9 -o main.o main.cpp "-I/c/Development/Libraries/wx-2.9/include"
In file included from main.cpp:1:0:
main.h:13:5: error: 'Layout' does not name a type
main.cpp: In constructor 'MainWindow::MainWindow(const wxString&)':
main.cpp:19:5: error: 'layout' was not declared in this scope
main.cpp:19:18: error: expected type-specifier before 'Layout'
main.cpp:19:18: error: expected ';' before 'Layout'
make: *** [main.o] Error 1