c++ - Declaring an array of objects -


i have create array of objects have parameterized constructor in class initialization attributes of class. how in c++?

with "normal" initialization list?

example:

struct s {     s(int, const std::string&) {}  // dummy constructor };  s array_of_s[2] = {     s(123, "foo"),     s(456, "bar") }; 

Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -