Click here to Skip to main content
15,922,584 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Accessing remote registry in different domain Pin
Member 172121510-Feb-05 14:05
Member 172121510-Feb-05 14:05 
GeneralPolygon replacement. Pin
Anthony98879-Feb-05 13:37
Anthony98879-Feb-05 13:37 
GeneralRe: Polygon replacement. Pin
John R. Shaw10-Feb-05 10:15
John R. Shaw10-Feb-05 10:15 
GeneralShell Extensions and ShellExecuteEx Pin
MasamuneXGP9-Feb-05 12:57
MasamuneXGP9-Feb-05 12:57 
GeneralShould be simple: CFile Dialog filters Pin
JKallen9-Feb-05 12:56
JKallen9-Feb-05 12:56 
GeneralRe: Should be simple: CFile Dialog filters Pin
Chris Losinger10-Feb-05 3:58
professionalChris Losinger10-Feb-05 3:58 
GeneralRe: Should be simple: CFile Dialog filters Pin
JKallen11-Feb-05 11:42
JKallen11-Feb-05 11:42 
Generalproject path Pin
chints819-Feb-05 11:45
chints819-Feb-05 11:45 
GeneralRe: project path Pin
2249179-Feb-05 16:47
2249179-Feb-05 16:47 
GeneralWinsock Connect() Problems Pin
manofoblivion9-Feb-05 11:33
manofoblivion9-Feb-05 11:33 
GeneralRe: Winsock Connect() Problems Pin
rocky_pulley10-Feb-05 4:47
rocky_pulley10-Feb-05 4:47 
GeneralRe: Winsock Connect() Problems Pin
manofoblivion10-Feb-05 12:48
manofoblivion10-Feb-05 12:48 
Generalsearch the harddrive Pin
jonavon blakly9-Feb-05 11:05
jonavon blakly9-Feb-05 11:05 
GeneralRe: search the harddrive Pin
2249179-Feb-05 16:59
2249179-Feb-05 16:59 
Questionwhat does #line really do Pin
Jim Crafton9-Feb-05 10:00
Jim Crafton9-Feb-05 10:00 
AnswerRe: what does #line really do Pin
basementman9-Feb-05 10:36
basementman9-Feb-05 10:36 
AnswerRe: what does #line really do Pin
Ryan Binns9-Feb-05 17:32
Ryan Binns9-Feb-05 17:32 
GeneralDebug another Process Pin
Chris Meech9-Feb-05 9:19
Chris Meech9-Feb-05 9:19 
GeneralRe: Debug another Process Pin
Chris Losinger9-Feb-05 9:22
professionalChris Losinger9-Feb-05 9:22 
GeneralRe: Debug another Process Pin
Chris Meech9-Feb-05 9:40
Chris Meech9-Feb-05 9:40 
QuestionHow about this... Pin
bilas9-Feb-05 8:57
bilas9-Feb-05 8:57 
AnswerRe: How about this... Pin
Neville Franks9-Feb-05 10:20
Neville Franks9-Feb-05 10:20 
GeneralRe: How about this... Pin
bilas10-Feb-05 6:32
bilas10-Feb-05 6:32 
Generaldefining a string constant Pin
K. Shaffer9-Feb-05 7:14
K. Shaffer9-Feb-05 7:14 
I have a constants.h file that I would like to use to store constants and such.

When I include the file in a class in my project I keep getting Link Error:2005: "already defined in" errors when I try to declare a string constant in the constant.h file.

How do I create global string constants that I can use througout my app?


// constants.h: defines constants to be used througout application.
//
//////////////////////////////////////////////////////////////////////

#if !defined(APP_CONSTANTS_0209051212)
#define APP_CONSTANTS_0209051212

//no problems here
const APP_PATH_STRING_LENGTH = 255;

//link errors when using these
char* app_data_path = "data\\";
char* app_charts_path = "c:\\CHARTS\\";


#endif // !defined(APP_CONSTANTS_0209051212)


Kevin Shaffer
kshaff03@msn.com
GeneralRe: defining a string constant Pin
K. Shaffer9-Feb-05 7:22
K. Shaffer9-Feb-05 7:22 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.