0

Okay, I have a situation like this.

foo.h

#ifndef _FOO
#define _FOO

template <typename ItemType>
class foo{
    private:
        //stuff
    public:
        //more stuff
};

#include "foo.cpp"

#endif

And of course, in foo.cpp, I have my implementation. Assume that this class doesn't depend on including other files and whatnot. Since c++ isn't cool with including header in source for templates without the compiler demanding explicit instantiation, we are including source in header. Prof says no editing this code. How do I get to my foo.o with GCC? I can't find a way.

0 Answers0