:
foo.h C, .
foo.h :
> cpp foo.h
class bar{
public:
static const int MY_DEFINE = 10;
foo::my_enum_type var;
bar() {};
~bar() {};
};
class foo{
public:
enum my_enum_type { ONE, TWO, THREE };
foo();
~foo() {}
};
, , ++. foo . ++, Java, , .
- .
#ifndef #pragma once - bar.h foo.h.
- (
bar foo.h, ). - *.cpp.
, PIMPL.
- #include "bar.h" foo.h