Click here to Skip to main content
15,893,486 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: IXMLDOMNode as an idl parameter Pin
nlecren2-Oct-02 9:21
nlecren2-Oct-02 9:21 
GeneralRe: IXMLDOMNode as an idl parameter Pin
Stephane Rodriguez.2-Oct-02 9:42
Stephane Rodriguez.2-Oct-02 9:42 
GeneralProblem automating Excel Pin
Anonymous2-Oct-02 7:43
Anonymous2-Oct-02 7:43 
GeneralSmart Pointer question Pin
User 98852-Oct-02 7:40
User 98852-Oct-02 7:40 
Generalmap object in STL Pin
ns2-Oct-02 7:33
ns2-Oct-02 7:33 
GeneralRe: map object in STL Pin
Marc Britten2-Oct-02 7:38
Marc Britten2-Oct-02 7:38 
GeneralRe: map object in STL Pin
ns2-Oct-02 7:47
ns2-Oct-02 7:47 
GeneralRe: map object in STL Pin
Chris Losinger2-Oct-02 7:41
professionalChris Losinger2-Oct-02 7:41 
ns wrote:
Someone told me that this statement below will create the element of index n1 and fill it with n2

it's not true, and you can prove it with the code below.

map<int, int> myMap;

   int t = 50;
   t = myMap[10];

   map<int, int>::iterator it;

   for (it=myMap.begin(); it!=myMap.end(); it++)
   {
      printf("%d, %d\n", (*it).first, (*it).second);
   }


the output is 10, 0; not 10, 50.

it will create the element, but the value part of it is the default value for the object (for an int, i guess the default is 0, in debug mode anyway).

if you want to set the value, you have to use : myMap[10] = 50;

-c


All you have to do is tell the people they are being attacked, and denounce the opposition for lack of patriotism and exposing the country to danger.
-- Herman Goering, on how to control the public

GeneralRe: map object in STL Pin
ns2-Oct-02 7:48
ns2-Oct-02 7:48 
QuestionIs there a way to send a script file to a server and run it there in VC++ code? Pin
Anonymous2-Oct-02 7:21
Anonymous2-Oct-02 7:21 
AnswerRe: Is there a way to send a script file to a server and run it there in VC++ code? Pin
TyMatthews2-Oct-02 10:54
TyMatthews2-Oct-02 10:54 
GeneralCatch image bar under the mouse Pin
progman2-Oct-02 6:59
progman2-Oct-02 6:59 
Generalmakeing VC project with MINGW Pin
sagmam2-Oct-02 6:49
sagmam2-Oct-02 6:49 
GeneralRe: makeing VC project with MINGW Pin
Mike Eriksson2-Oct-02 21:18
Mike Eriksson2-Oct-02 21:18 
GeneralSTL queue Pin
JohnnyG2-Oct-02 6:32
JohnnyG2-Oct-02 6:32 
GeneralRe: STL queue Pin
TyMatthews2-Oct-02 9:04
TyMatthews2-Oct-02 9:04 
GeneralRe: STL queue Pin
JohnnyG2-Oct-02 10:16
JohnnyG2-Oct-02 10:16 
GeneralRe: STL queue Pin
TyMatthews2-Oct-02 10:34
TyMatthews2-Oct-02 10:34 
GeneralGetting an HWND from an HINSTANCE Pin
Harold Bamford2-Oct-02 6:21
Harold Bamford2-Oct-02 6:21 
GeneralRe: Getting an HWND from an HINSTANCE Pin
Phil J Pearson2-Oct-02 7:14
Phil J Pearson2-Oct-02 7:14 
GeneralRe: Getting an HWND from an HINSTANCE Pin
Chris Richardson2-Oct-02 9:58
Chris Richardson2-Oct-02 9:58 
GeneralRe: Getting an HWND from an HINSTANCE Pin
Harold Bamford2-Oct-02 11:46
Harold Bamford2-Oct-02 11:46 
GeneralRe: Getting an HWND from an HINSTANCE Pin
Chris Richardson2-Oct-02 11:59
Chris Richardson2-Oct-02 11:59 
GeneralRe: Getting an HWND from an HINSTANCE Pin
Phil J Pearson2-Oct-02 12:10
Phil J Pearson2-Oct-02 12:10 
GeneralRe: Getting an HWND from an HINSTANCE Pin
Chris Richardson2-Oct-02 12:19
Chris Richardson2-Oct-02 12:19 

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.