How do I put the code of methods outside classes in a header file?
The code of a method specied in a header le must be declared inline. It means that when compiling, the calls to the method will all be replaced by the code of that method.
struct A
{
int a;
A();
};
inline A::A()
{
/* ... */
};
0 comments:
Post a Comment