Click here to Skip to main content
15,885,915 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Program Deployment Pin
Mircea Puiu23-Sep-05 2:52
Mircea Puiu23-Sep-05 2:52 
Questioninitialize stl map in static scope Pin
yccheok22-Sep-05 23:10
yccheok22-Sep-05 23:10 
AnswerRe: initialize stl map in static scope Pin
toxcct22-Sep-05 23:22
toxcct22-Sep-05 23:22 
GeneralRe: initialize stl map in static scope Pin
Cedric Moonen22-Sep-05 23:46
Cedric Moonen22-Sep-05 23:46 
GeneralRe: initialize stl map in static scope Pin
toxcct22-Sep-05 23:52
toxcct22-Sep-05 23:52 
GeneralRe: initialize stl map in static scope Pin
yccheok23-Sep-05 1:28
yccheok23-Sep-05 1:28 
GeneralRe: initialize stl map in static scope Pin
Laffis23-Sep-05 1:06
Laffis23-Sep-05 1:06 
GeneralRe: initialize stl map in static scope Pin
yccheok23-Sep-05 1:19
yccheok23-Sep-05 1:19 
However, that need to instance the object first before the static variable can get initialized.

I have a suggestion of doing so by using lazy initialization. not so good since it is not really insert the element in static scope. however, this at least still meet my initial need: get element inserted into stl map before the class object instance created.

class x {
public:
static const map<int, int="">& GetMap {
static const map<int, int=""> m;
if(m.size() == 0) {
// Perform element insertion here.
//
}
return m;
}
};Smile | :)
AnswerRe: initialize stl map in static scope Pin
Tim Smith23-Sep-05 3:58
Tim Smith23-Sep-05 3:58 
AnswerRe: pointer to char array Pin
Eytukan22-Sep-05 23:02
Eytukan22-Sep-05 23:02 
GeneralRe: pointer to char array Pin
sunit523-Sep-05 2:56
sunit523-Sep-05 2:56 
GeneralRe: pointer to char array Pin
ThatsAlok23-Sep-05 17:53
ThatsAlok23-Sep-05 17:53 
AnswerRe: pointer to char array Pin
FarPointer23-Sep-05 1:22
FarPointer23-Sep-05 1:22 
QuestionA very urgent problem Pin
momer22-Sep-05 22:17
momer22-Sep-05 22:17 
QuestionCryptEncrypt and CryptDecrypt functions of CryptoApi problems Pin
naeemnimi22-Sep-05 21:49
naeemnimi22-Sep-05 21:49 
AnswerRe: CryptEncrypt and CryptDecrypt functions of CryptoApi problems Pin
Elmue6-Sep-10 9:51
Elmue6-Sep-10 9:51 
Questioni need help to fix the histogram.plz Pin
davidcooler22-Sep-05 21:26
davidcooler22-Sep-05 21:26 
JokeRe: i need help to fix the histogram.plz Pin
khan++22-Sep-05 21:43
khan++22-Sep-05 21:43 
GeneralRe: i need help to fix the histogram.plz Pin
David Crow23-Sep-05 3:46
David Crow23-Sep-05 3:46 
AnswerRe: i need help to fix the histogram.plz Pin
David Crow23-Sep-05 3:32
David Crow23-Sep-05 3:32 
QuestionHow to place the child Dialogs on TaskBar???? Pin
G.Radhakrishna22-Sep-05 20:48
G.Radhakrishna22-Sep-05 20:48 
AnswerRe: How to place the child Dialogs on TaskBar???? Pin
prasad_som22-Sep-05 21:17
prasad_som22-Sep-05 21:17 
Questionrespond message Pin
Member 216100422-Sep-05 20:41
Member 216100422-Sep-05 20:41 
AnswerRe: respond message Pin
Cedric Moonen22-Sep-05 20:49
Cedric Moonen22-Sep-05 20:49 
GeneralRe: respond message Pin
Member 216100422-Sep-05 21:45
Member 216100422-Sep-05 21:45 

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.