Fixed multiple definition error in C++