Skip to main content
GameDev.net gamedev.net
🔒 Locked

Quick question on #define constants

Started by the_better_nick Jan 6, 2001 at 1:20 PM 1 replies 350+ views
Original Post
the_better_nick
the_better_nick
Hi, I just switched from Borland to Microsoft compilers, and I am having a small problem. Here''s a code example: #define WND_NAME_LENGTH 21; class MainWindow : public Window{ // my generic windows higharchy private: static char szClassName[WND_NAME_LENGTH]; ... Anyway it says there a missing '']''. (Codes C2143, 2059, and 2238) Now, I can put a const int in there and it accepts it fine, but I prefer to use the #define. Thanks, ·†§ Nick §† ·
·†§ Nick §† ·
the_better_nick
the_better_nick
Oops, I knew that. Thanks, that fixed it.


·†§ Nick §† ·
·†§ Nick §† ·

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.