What is this:
int();
? Is it a call to a default int
constructor? According to this built-in types don't have constructors. Then what is it? I know (more or less) what it does - it returns an int equal to 0:
int a = int(); // after this a == 0
And it looks like a default constructor. So why can't this:
int a; // local variable
also initialize a
with 0? I'm trying to understand how built-in types work and when they get initialized with 0
, and when they don't.