Im trying to organize some of my functions for a program that has become quite large. I want to use another file that holds a namespace 'Message' which wraps around my large functions that print text. I tried using just a cpp file and witing the namepace and functions in the same file, but the compiler gave me errors stating the functions had already been defined. I tried making a header file to hold the namepace declaration, then using a cpp file for the funciton definition, but the errors instead popped up saying the function has been defined mutiple times again. Here are the two files i attempted:
main.cpp(only the portion that gives me a problem)
1 2 3 4 5 6 7 8 9
int main()
{
Map mObj(2);
Message::SetMenu();
Message::PrintOpening();
do{LoopGame(mObj);}while(Restart());
//BEYOND THIS POINT IN MAIN IS NEW CODE(UNFINISHED)
std::cout << "\n\t\tThanks for playing!";
}