Click here to Skip to main content
15,892,809 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Full details about BHO in VC++ MFC Pin
Abhi Lahare4-May-06 19:05
Abhi Lahare4-May-06 19:05 
Question2D array dynamic memery location and pass to function Pin
mrby1234-May-06 18:31
mrby1234-May-06 18:31 
AnswerRe: 2D array dynamic memery location and pass to function Pin
Steve Echols4-May-06 19:46
Steve Echols4-May-06 19:46 
AnswerRe: Linker Error!!!! Pin
Justin Tay4-May-06 18:18
Justin Tay4-May-06 18:18 
Questionuse a const variable as opposed to #define - Multiple const objects created Pin
yccheok4-May-06 17:22
yccheok4-May-06 17:22 
AnswerRe: use a const variable as opposed to #define - Multiple const objects created Pin
George L. Jackson4-May-06 17:26
George L. Jackson4-May-06 17:26 
GeneralRe: use a const variable as opposed to #define - Multiple const objects created Pin
yccheok4-May-06 19:51
yccheok4-May-06 19:51 
AnswerRe: use a const variable as opposed to #define - Multiple const objects created Pin
Nibu babu thomas4-May-06 20:11
Nibu babu thomas4-May-06 20:11 
#ifndef, #define and #endif combination works to prevent redundant inclusion in the same file.

This will not work if you are including them in different .cpp files. Since in that .cpp file the macro that you are checking is not defined. Hence it creates another std::string version var.

What you have to do is create a global variable by declaring it in a header file which will be included everywhere (for example stdafx.h in VC6) like wise

extern std::string version;
and then defining it in any one and only one of the .cpp files.

Now you can use the variable by including the header file where you wish to use the variable.

Do read the faqs[^] too.


Nibu thomas
Software Developer

QuestionStop the looping...(urgent) Pin
makaveli_074-May-06 16:50
makaveli_074-May-06 16:50 
AnswerRe: Stop the looping...(urgent) Pin
Stephen Hewitt4-May-06 17:02
Stephen Hewitt4-May-06 17:02 
GeneralRe: Stop the looping...(urgent) Pin
makaveli_074-May-06 17:20
makaveli_074-May-06 17:20 
AnswerRe: Stop the looping...(urgent) Pin
Aqueel4-May-06 17:31
Aqueel4-May-06 17:31 
GeneralRe: Stop the looping...(urgent) Pin
makaveli_074-May-06 17:43
makaveli_074-May-06 17:43 
GeneralRe: Stop the looping...(urgent) Pin
Aqueel4-May-06 17:53
Aqueel4-May-06 17:53 
GeneralRe: Stop the looping...(urgent) Pin
makaveli_074-May-06 17:56
makaveli_074-May-06 17:56 
GeneralRe: Stop the looping...(urgent) Pin
Aqueel4-May-06 18:09
Aqueel4-May-06 18:09 
GeneralRe: Stop the looping...(urgent) Pin
Aqueel4-May-06 18:12
Aqueel4-May-06 18:12 
GeneralRe: Stop the looping...(urgent) Pin
makaveli_074-May-06 18:42
makaveli_074-May-06 18:42 
GeneralRe: Stop the looping...(urgent) Pin
Stephen Hewitt4-May-06 18:13
Stephen Hewitt4-May-06 18:13 
GeneralRe: Stop the looping...(urgent) Pin
Aqueel4-May-06 18:16
Aqueel4-May-06 18:16 
GeneralRe: Stop the looping...(urgent) Pin
makaveli_074-May-06 18:44
makaveli_074-May-06 18:44 
GeneralRe: Stop the looping...(urgent) Pin
Aqueel4-May-06 18:50
Aqueel4-May-06 18:50 
GeneralRe: Stop the looping...(urgent) Pin
makaveli_074-May-06 19:02
makaveli_074-May-06 19:02 
GeneralRe: Stop the looping...(urgent) Pin
Cedric Moonen4-May-06 20:31
Cedric Moonen4-May-06 20:31 
GeneralRe: Stop the looping...(urgent) Pin
makaveli_074-May-06 18:48
makaveli_074-May-06 18:48 

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.