c++ - what does default constructor do when it's empty? -


i wonder if explain default ctor after memory allocated, how initializes allocated memory?

i don't know languange asked question for, try answer anyway c++ , java

in c++, :

  • leaves built-in types (int, float, pointers, etc.) uninitialized value
  • calls default constructor on class members

in java, think class members initialized default value (0 or null).


Comments

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

visual c++ - Using relative values in array sorting ( asm ) -