Ubuntu 16.04 Codeblocks - 新建类
1. File -> New -> Class
2. Create new class
Header and implementation file shall be in same folder
3. Smooth Module
SmoothModule.cpp
#include "SmoothModule.hpp"
SmoothModule::SmoothModule()
{
//ctor
}
SmoothModule::~SmoothModule()
{
//dtor
}
SmoothModule.hpp
#ifndef SMOOTHMODULE_HPP
#define SMOOTHMODULE_HPP
class SmoothModule
{
public:
SmoothModule();
virtual ~SmoothModule();
protected:
private:
};
#endif // SMOOTHMODULE_HPP
main.cpp
#include <iostream>
using namespace std;
int main()
{
cout << "Hello world!" << endl;
return 0;
}