Click here to Skip to main content
15,917,652 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: STL gurus map operator [] Pin
Jim Crafton27-Aug-02 6:20
Jim Crafton27-Aug-02 6:20 
GeneralRe: STL gurus map operator [] Pin
_Magnus_27-Aug-02 6:25
_Magnus_27-Aug-02 6:25 
GeneralRe: STL gurus map operator [] Pin
Tomasz Sowinski27-Aug-02 6:26
Tomasz Sowinski27-Aug-02 6:26 
GeneralRe: STL gurus map operator [] Pin
Tomasz Sowinski27-Aug-02 6:25
Tomasz Sowinski27-Aug-02 6:25 
GeneralRe: STL gurus map operator [] Pin
Jim Crafton27-Aug-02 6:28
Jim Crafton27-Aug-02 6:28 
GeneralRe: STL gurus map operator [] Pin
Tomasz Sowinski27-Aug-02 6:30
Tomasz Sowinski27-Aug-02 6:30 
GeneralRe: STL gurus map operator [] Pin
Jim Crafton27-Aug-02 6:33
Jim Crafton27-Aug-02 6:33 
GeneralRe: STL gurus map operator [] Pin
Tomasz Sowinski27-Aug-02 6:41
Tomasz Sowinski27-Aug-02 6:41 
Jim Crafton wrote:
So simple types (int, float?, double, char etc) are all initialized to 0 ?

Not exactly. When you're declaring an int without initializer, you'll get random bits:
int x;
// x contains garbage


However, you can initialize variable with constant, or with this pseudo-constructor syntax:
int x = 5; // you know what x is
int y = int(); // y is zero
int z = int(3); // z is 3



Jim Crafton wrote:
I take it that it is part of the C++ standard right ?

I guess it is. Otherwise standard containers would have hard time working with ints and doubles. In the STL sources there are many T t = T() constructs which have to work OK with simple types.

Tomasz Sowinski -- http://www.shooltz.com

Free your mind and your ass will follow.

GeneralRelease Version Of Code Library Pin
SchmoBoy27-Aug-02 5:12
SchmoBoy27-Aug-02 5:12 
GeneralRe: Release Version Of Code Library Pin
Tomasz Sowinski27-Aug-02 5:20
Tomasz Sowinski27-Aug-02 5:20 
GeneralRe: Release Version Of Code Library Pin
Roger Allen27-Aug-02 6:04
Roger Allen27-Aug-02 6:04 
GeneralRe: Release Version Of Code Library Pin
Chris Losinger27-Aug-02 6:09
professionalChris Losinger27-Aug-02 6:09 
GeneralRe: Release Version Of Code Library Pin
Roger Allen27-Aug-02 6:12
Roger Allen27-Aug-02 6:12 
GeneralRe: Release Version Of Code Library Pin
Chris Losinger27-Aug-02 6:12
professionalChris Losinger27-Aug-02 6:12 
GeneralRe: Release Version Of Code Library Pin
SchmoBoy27-Aug-02 6:17
SchmoBoy27-Aug-02 6:17 
GeneralRe: Release Version Of Code Library Pin
Tomasz Sowinski27-Aug-02 6:20
Tomasz Sowinski27-Aug-02 6:20 
GeneralRe: Release Version Of Code Library Pin
SchmoBoy27-Aug-02 6:25
SchmoBoy27-Aug-02 6:25 
GeneralRe: Release Version Of Code Library Pin
Tomasz Sowinski27-Aug-02 6:28
Tomasz Sowinski27-Aug-02 6:28 
GeneralRe: Release Version Of Code Library Pin
SchmoBoy27-Aug-02 6:31
SchmoBoy27-Aug-02 6:31 
GeneralRe: Release Version Of Code Library Pin
Tomasz Sowinski27-Aug-02 6:37
Tomasz Sowinski27-Aug-02 6:37 
GeneralRe: Release Version Of Code Library (SOLUTION FOUND!!!!!) Pin
SchmoBoy27-Aug-02 7:23
SchmoBoy27-Aug-02 7:23 
GeneralRe: Release Version Of Code Library (SOLUTION FOUND!!!!!) Pin
Tomasz Sowinski27-Aug-02 8:05
Tomasz Sowinski27-Aug-02 8:05 
GeneralRe: Release Version Of Code Library (SOLUTION FOUND!!!!!) Pin
SchmoBoy27-Aug-02 8:21
SchmoBoy27-Aug-02 8:21 
GeneralRe: Release Version Of Code Library Pin
Chris Losinger27-Aug-02 6:25
professionalChris Losinger27-Aug-02 6:25 
GeneralRe: Release Version Of Code Library Pin
Daniel Turini27-Aug-02 6:25
Daniel Turini27-Aug-02 6:25 

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.