Hello I\'m writing a little project in c++ where I would like to have some classes that does some work, I wrote the interfaces and the implementation of the classes.
The
First, this is wrong: animal dog = new animal();
You either need
animal * dog = new animal();
cout << dog->method1(42);
delete animal;
or preferably just
animal dog;
Second, you need to link together the object files produced by compiling your two source .cpp files.
gcc -o animal animal.cpp app.cpp
should do the trick, if you're using gcc.