Recently, I was confused by the std::map operator[] function. In the MSDN library, it says: \"If the argument key value is not found, then it is inserted along with the defa
The default value of class-type objects is that set by the default constructor of the class. For built-in types the default value is 0.
But note that there is a difference between a built-in variable that isn't initialized, and one initialized to its default value. A built-in that is not initialized will probably hold whatever value was in that variable's memory address at the time.
int i; // i has an arbitrary undefined value
int x = int(); // x is 0