Skip to main content
Stack Overflow
  1. About
  2. For Teams

Return to Answer

added more info
Source Link
jasonline
  • 9.2k
  • 20
  • 63
  • 82

Yes, I believe it should work and it can also be applied to other data types.

For class arrays though, if there are fewer items in the initializer list than elements in the array, the default constructor is used for the remaining elements. If no default constructor is defined for the class, the initializer list must be complete — that is, there must be one initializer for each element in the array.

Yes, I believe it should work and it can also be applied to other data types.

Yes, I believe it should work and it can also be applied to other data types.

For class arrays though, if there are fewer items in the initializer list than elements in the array, the default constructor is used for the remaining elements. If no default constructor is defined for the class, the initializer list must be complete — that is, there must be one initializer for each element in the array.

Source Link
jasonline
  • 9.2k
  • 20
  • 63
  • 82

Yes, I believe it should work and it can also be applied to other data types.

lang-cpp

AltStyle によって変換されたページ (->オリジナル) /