In file included from main.cpp:17:0:
factory.h: In function 'Object* my_new_smth_()':
factory.h:25:19: error: 'class_id' was not declared in this scope
return new Smth(class_id);
^~~~~~~~
factory.h:25:19: note: suggested alternative: 'class'
return new Smth(class_id);
^~~~~~~~
class
main.cpp: At global scope:
main.cpp:27:7: error: redefinition of 'class Smth'
class Smth : public Object {
^~~~
In file included from main.cpp:17:0:
factory.h:11:7: note: previous definition of 'class Smth'
class Smth : public Object {
^~~~
main.cpp: In function 'Object* my_new_smth_()':
main.cpp:40:9: error: redefinition of 'Object* my_new_smth_()'
Object* my_new_smth_() {
^~~~~~~~~~~~
In file included from main.cpp:17:0:
factory.h:24:9: note: 'Object* my_new_smth_()' previously defined here
Object *my_new_smth_() {
^~~~~~~~~~~~
|