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

assembly - 8086 TASM: Illegal Indexing Mode -

Java, LWJGL, OpenGL 1.1, decoding BufferedImage to Bytebuffer and binding to OpenGL across classes -

asp.net - Configuring WCF Services in Code WCF 4.5 -