Rel*_*opz 6 c++ codeblocks winmain
我正在学习C++,而且我一直在关注thenewboston.org上的教程.我正在尝试将类放在不同的文件中.在Codeblocks中编译时,我收到消息"未定义的WinMain @ 16引用".这是我的代码:
Burrito.cpp
#include "Burrito.h"
#include <iostream>
using namespace std;
Burrito::Burrito()
{
cout << "Im a burrito!"<< endl;
}
Run Code Online (Sandbox Code Playgroud)
Burrito.h
#ifndef BURRITO_H
#define BURRITO_H
class Burrito
{
public:
Burrito();
};
#endif // BURRITO_H
Run Code Online (Sandbox Code Playgroud)
main.cpp中
#include <iostream>
#include "Burrito.h"
using namespace std;
int main()
{
Burrito Obj1;
return 0;
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
19344 次 |
| 最近记录: |