@jiafu: 3.2/4 (about the One definition Rule); "Every program shall contain exactly one definition of everynon-inline function or variable that is odr-used in that program; no diagnostic required". And 9.3./2: "A member function may be defined (8.4) in its class definition, in which case it is an inline member function (7.1.2), [...]
there is one class.h object with method test() which has detailed execute content。
class Object{
void test(){
cout<<"do test"<<endl;
}
}
thus cpp1 include the Object.h and cpp2 included it two, why it doesn't popup multiple definition error when linking cpp1 and cpp2?