So I have a header file which has function implementations in it as well as prototypes. I am now trying to separate these implementations from the file and just leave the prototypes since I know its not good standards to have the implementations in header files. However when I remove the implementations from the header file and put them in their own cpp file and then try to link that cpp file to the rest of the project it complains about multiple definitions of the functions. Thanks for any help/advice
std::bitset<LENGTH> foo1(const std::string stringVal); std::bitset<LENGTH> foo2(const int decimalVal); std::string foo3(const int integerVal); I have an include guard on so it doesn't get included more than once as well.
Then in the cpp I simply have my implementations for these functions just straightforward. Yet it complains of multiple definitions of the functions if they are separate from the header file.
#includelines are probably most relevant..cppfile, or did you re-compile everything for which a header changed (or the whole project, for simplicity)?