Another very basic question regarding int constructors

Hi all,
look at this :

1
2
int a;
int b = int();


consider this two lines are local variables.

Why have some crazy value, and b is initialized to 0 ?
I thought int a; will call the default constructor of int, which is int().
What am I missing ?

Thank you in advance
Haven't we done this already? Here:
http://www.cplusplus.com/forum/beginner/12533/
Yes, of course, it seems that I misunderstood something.

I'm sorry for this post.
Best regards
The basic type constructor is called implicitly only for global variables
Topic archived. No new replies allowed.