Click here to Skip to main content
15,919,434 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Offtopic Pin
Themis23-Sep-05 2:47
Themis23-Sep-05 2:47 
QuestionLinker Error Pin
rajeevktripathi22-Sep-05 23:43
rajeevktripathi22-Sep-05 23:43 
AnswerRe: Linker Error Pin
ThatsAlok23-Sep-05 0:05
ThatsAlok23-Sep-05 0:05 
AnswerRe: Linker Error Pin
MailtoGops23-Sep-05 0:11
MailtoGops23-Sep-05 0:11 
QuestionProgram Deployment Pin
mikobi22-Sep-05 23:19
mikobi22-Sep-05 23:19 
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 
where did you see you could access a private member from outside the class like that ?

second point : did you have a look at how a map was working ?

<font color=blue>class</font> x {
  <font color=blue>private</font>:
    <font color=blue>static</font> std::map<your_key_type, your_value_type> var;
 
  <font color=blue>public</font>:
    x();
    <font color=blue>void</font> InsertInMap(your_key_type k, your_value_type v);
};
 
 
x::x() {
    <font color=green>//Class Initialisations here...</font>
}
 
<font color=blue>void</font> x::InsertInMap(your_key_type k, your_value_type v) {
    x::var[k] = v;
}
 
<font color=blue>void main</font>(<font color=blue>void</font>) {
 x myX;
 x.InsertInMap(1, 2);
 x.InsertInMap(3, 4);
}


next time, read the docs...



TOXCCT >>> GEII power
[toxcct][VisualCalc]

-- modified at 5:26 Friday 23rd September, 2005
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 
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 

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.