我有这个类,它应该只有一个成员变量处理程序m_handle;如你看到的。你能解释一下我怎么可能得到以下错误: Fehler 1错误C2146:Syntaxfehler:缺少&#39 ;;'在键入' m_handle'之前。 handler是一个绝对正常的正确创建的类。
#ifndef BUTTONMANAGER_HPP
#define BUTTONMANAGER_HPP
#include <SFGUI/SFGUI.hpp>
#include <SFML/Graphics.hpp>
#include <sstream>
#include "handler.hpp"
class buttonmanager
{
public:
void ButtonClick();
buttonmanager(std::string hover, std::string normal, std::string buttontext, std::string id);
sfg::Alignment::Ptr GetButton();
sfg::Button::Ptr GetButtontrue();
private:
handler m_handle;
std::string m_requestparameters;
sfg::Window::Ptr m_window;
bool m_needdesk;
sfg::Spinner::Ptr m_spinner;
std::string m_hoverS;
std::string m_normalS;
sf::Image m_hover;
sf::Image m_normal;
sfg::Button::Ptr m_button;
sfg::Alignment::Ptr m_alignment;
std::string m_id;
void OnMouseOver();
void OnMouseLeave();
void SendRequest();
// static void ThreadFunction(sfg::Desktop* pDesk,handler* pHandler,sfg::Window::Ptr pWindow);
};
#endif
Handler.hpp
#ifndef HANDLER_HPP
#define HANDLER_HPP
#include <SFGUI/SFGUI.hpp>
#include <vector>
#include <SFML/Graphics.hpp>
#include <sstream>
#include "buttonmanager.hpp"
class handler
{
public:
handler();
handler(sfg::Desktop* pDesk);
sfg::Notebook::Ptr getNotebook();
sfg::Table::Ptr UpdateBox();
void scroll(int pType);
std::string wordWrap( std::string str, size_t width = 55 );
void filltable(int pPage);
void SetWordWrap(int pWrap);
bool m_updaterunning;
int GetActiveWindows();
void SetActiveWindows(int pWindows);
void SetWindow(sfg::Window::Ptr pWindow);
void SetInfoWindowsActive();
void SetWindowUpdating(int pCase);
void SetResponse(std::string pResponse);
void SetCurrentId(std::string pId);
void SetTempId(std::string pId);
void SetId(std::string Id);
void SendRequest();
void SendRequest2();
void SendRequest3();
void SendRequest4();
void SendRequest5();
void SendRequest6();
void CloseWindow();
void ButtonClick();
private:
sfg::Entry::Ptr m_titleentry;
sfg::Entry::Ptr m_descriptionentry;
sfg::Entry::Ptr m_useraddentry;
sfg::Entry::Ptr m_changetitleentry;
sfg::Entry::Ptr m_changedescriptionentry;
int m_windowUpdating;
sfg::Window::Ptr m_window;
std::string m_response;
int m_activeWindows;
int m_wordwrap;
std::string m_currentId;
std::string m_tempId;
sfg::Desktop* m_desktop;
sf::Clock m_clock;
sfg::Notebook::Ptr m_notebook;
sfg::Box::Ptr m_task_box;
sfg::Box::Ptr m_project_box;
sfg::Box::Ptr m_client_box;
sfg::Box::Ptr m_window_box;
sfg::Alignment::Ptr alignment;
std::vector<sfg::Widget> pageone;
sfg::Table::Ptr m_task_table;
sfg::Table::Ptr m_project_table;
sfg::Table::Ptr m_client_table;
sfg::ScrolledWindow::Ptr m_task_scrolledwindow;
sfg::ScrolledWindow::Ptr m_project_scrolledwindow;
sfg::ScrolledWindow::Ptr m_client_scrolledwindow;
std::string m_username;
std::string m_password;
std::string find(std::string& body, std::string rule);
std::string replaceAll(std::string str, const std::string from, const std::string to);
static void handler::RequestThread(int* pUpdating,std::string pSendString);
static void ThreadFunction(handler* pHandler);
};
#endif // !NOTEBOOK_HPP