我是c ++的新手,我开始使用代码:blocks。 今天我开发了我的第一个控制台应用程序(它正常工作:D)然后我尝试添加一个框架与opengl,但我犯了一个错误。 这是代码: (这是控制台应用程序代码)
#include <iostream>
using namespace std;
int main()
{
int x;
int y;
cin >> x;
cin >> y;
cout << "Type 1 for add(+)." << endl;
cout << "Type 2 for removal(-)." << endl;
cout << "Type 3 for multiplication(x)." << endl;
cout << "Type 4 for division(:)." << endl;
cout << "To see the rest of the division of the two number type 5." << endl;
cout << "To compare the two numbers type 6." << endl;
int c;
cin >> c;
if(c == 1)
{
cout << x + y << endl;
}
else if(c == 2)
{
cout << x - y << endl;
}
else if(c == 3)
{
cout << x * y << endl;
}
else if(c == 4)
{
cout << x / y << endl;
}
else if(c == 5)
{
cout << x % y << endl;
}
else if(c == 6)
{
if(x<y)
{
cout << " first number is smaller than the second." << endl;
}
else if(x == y)
{
cout << " first number is equal with the second."<< endl;
}
else if(x>y)
{
cout << " first number is bigger than the second." << endl;
}
}
else
{
cout << "\n\n\n\aOps,something was wrong, ensure that the characters you typed was all numbers and not anything else." << endl;
}
}
这是帧代码
#ifndef M___ENGINE_H
#define M___ENGINE_H
//(*Headers(M___Engine)
#include <wx/frame.h>
//*)
class M___Engine: public wxFrame
{
public:
M___Engine(wxWindow* parent,wxWindowID id=wxID_ANY,const wxPoint& pos=wxDefaultPosition,const wxSize& size=wxDefaultSize);
virtual ~M___Engine();
//(*Declarations(M___Engine)
//*)
protected:
//(*Identifiers(M___Engine)
//*)
private:
//(*Handlers(M___Engine)
//*)
DECLARE_EVENT_TABLE()
};
#endif
我在语句第5行的帧代码中从代码块中收到错误:#include