Fixed multiple definitions in C++