| ??? 05/24/12 08:05 Read: times |
#187486 - Does not compile Responding to: ???'s previous message |
The code you show will not compile. Please fix those errors first while learning to best C on the way.
Then I strongly recommend against putting definitions (the actual instantiations) of variables in header files. Only put extern declarations in header files and define the variables in a .c file. Make sure the implementation file also includes the header file with declarations so the compiler can verify the definitions against the declarations. |
| Topic | Author | Date |
| const strings in C | 01/01/70 00:00 | |
| Does not compile | 01/01/70 00:00 | |
| my question was | 01/01/70 00:00 | |
| Common to play with #define EXTERN | 01/01/70 00:00 | |
| Common doesn't mean recommended | 01/01/70 00:00 | |
| well I recommend it | 01/01/70 00:00 | |
| No - not hard to maintain at all | 01/01/70 00:00 | |
| C strings | 01/01/70 00:00 | |
| Whats wrong with a header file? | 01/01/70 00:00 | |
| nothing wrong, double work | 01/01/70 00:00 | |
| It works, and has advantages | 01/01/70 00:00 | |
| I got in a total absolute magnificent mess | 01/01/70 00:00 | |
| thanks to everyone, and next question is | 01/01/70 00:00 | |
| about (tables of) pointers to const strings | 01/01/70 00:00 | |
C++ and style | 01/01/70 00:00 |



