A
Adam L.
Hello all, again.
It's the Pascal guy trying to figure stuff out in C.
One of my programming 'ways' in Pascal is to create a unit file that has
most of the program's strings. Error messages, window titles, file paths,
etc... These are all constants.
1) What is the best way to have a long list of constant strings in C? I
read somewhere that I shouldn't define variables in a header file (which I
would do in the Interface part of a Pascal Unit). Do I just make some .c
file with all the strings and #include it somewhere?
2) What would you recommend as the type? A #define, const char[], ?
Just a note - I'm not using any type of RAD environment. This is a Linux
project. Much like my FreePascal coding, I use NEdit and the compiler. So
I don't have a fancy resource editor to click on.
Thanks!
It's the Pascal guy trying to figure stuff out in C.
One of my programming 'ways' in Pascal is to create a unit file that has
most of the program's strings. Error messages, window titles, file paths,
etc... These are all constants.
1) What is the best way to have a long list of constant strings in C? I
read somewhere that I shouldn't define variables in a header file (which I
would do in the Interface part of a Pascal Unit). Do I just make some .c
file with all the strings and #include it somewhere?
2) What would you recommend as the type? A #define, const char[], ?
Just a note - I'm not using any type of RAD environment. This is a Linux
project. Much like my FreePascal coding, I use NEdit and the compiler. So
I don't have a fancy resource editor to click on.
Thanks!