tag:blogger.com,1999:blog-3075162643750875707.post1867176576043920973..comments2024-03-15T12:49:54.643+00:00Comments on Ignoring the Voices: C++11: Initializer lists and range-for statementsDaz Fullerhttp://www.blogger.com/profile/01647263934740349316noreply@blogger.comBlogger3125tag:blogger.com,1999:blog-3075162643750875707.post-83163300087900770152013-04-14T00:22:18.514+01:002013-04-14T00:22:18.514+01:00One slight addition, you can cheat pre-c++11:
int...One slight addition, you can cheat pre-c++11:<br /><br />int arr[] = {1,2,3,4,5};<br />vector ints(arr,arr+(sizeof(arr)/sizeof(arr[0])));<br />-or simply-<br />vector ints(arr,arr+5);<br /><br />Not pretty but it'll work.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-3075162643750875707.post-4326836838162657652013-02-01T19:15:40.824+00:002013-02-01T19:15:40.824+00:00Thanks, glad you found it useful :) I've corr...Thanks, glad you found it useful :) I've corrected the "deliberate" grammatical mistake now as well.Daz Fullerhttps://www.blogger.com/profile/01647263934740349316noreply@blogger.comtag:blogger.com,1999:blog-3075162643750875707.post-47233613619013535702013-02-01T17:26:52.734+00:002013-02-01T17:26:52.734+00:00Great post! No code corrections, just one grammar ...Great post! No code corrections, just one grammar tweak: "now we to have a range loop" should be "now we too have a range loop".Anonymousnoreply@blogger.com