I am creating a console program in C++.
I have static text lines like "error wrong usage, usage is: program <parameter> <parameter2>"
or "game over!"
I recently had a C project where all code had to be all in one c file. I just made lots of defines like this:
#define ERRUSAGE "Usage error: correct usage is ./bla - bla2 -etc"
after the includes and before the function predefinitions.
Now I'm working on a c++ program where it's allowed to have multiple files. I've learned that I would use a .h file to define something and a .cpp file to implement something.
So is the way to go here making a staticTextOutput.h and fill it up with
#ifndef BLABLA
#define BLABLA "sometext"
#endif
and then include it where I need it?
What's the best practise here?
o/
EDIT:
Thanks for reminding me about making a const instead of using defines; that's a big point.
To refine my question: I'd also like to know what the file structure should look like (since .h files traditionally contain declarations and .cpp files definitions).
I know how this should look for functions and classes where would a struct (like the one Xaqq posted as answer) go since it has static/const members?