arrays - Alternative to designated initializers in C++ -


the style of code using designated initializers below belongs c language

 int widths[] = { [0] = 1, [10] = 2, [100] = 3 }; 

i know, there way write such simple code in c++?

in c++ have write

int widths[101] = { 1 }; widths[10]  = 2; widths[100] = 3; 

Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -