Вот случайная, неполная иллюстрация:
class Foo; // (incomplete forward) class declaration
class Foo { // class definition
int a; // member declaration + definition
int b(int, int); // member function declaration
static int c; // static member declaration
};
int Foo::b(int a, int b) { return a+b; } // member function definition
int Foo::c; // static member defintion
int bar(int); // free function declaration
int main() { // free function declaration + definition
int q; // declaration + definition
q = bar(0);
return q;
}
int bar(int a) { return 2 * a; } // free function definition
Возможно, «определение статического члена» является уникальным в том смысле, что оно предоставило фактический экземпляр объекта (т.е. размещение плюс конструкция) для объекта, который был объявлен в другом месте. Это сравнимо только с чисто внешним выражением:
extern int N; // declaration only, no definition
Не путать с объявлением + определение с внешней видимостью:
extern const int M = 11; // declaration and definition