hello c++ class

ref https://stackoverflow.com/questions/13341659/class-cpp-file-h-file-in-c



#pragma once
#ifndef FOO_H
#define FOO_H

class Foo{
public:
    void function();
protected:
private:
};
#endif

This is Foo's source file. Let's call it "foo.cpp"
#include "foo.h"
void Foo::function(){
    // ... implement ...
    return;
}

留言

熱門文章