I was wondering if anyone could tell me how I should initialize an array of elements due to the fact that the object does not have a default constructor (i.e. requires parameters).
For instance:
class Foo { public: Foo() : memberArray{bar(1), bar(3), bar(2)}
I am using GCC 4.6.1 and compiling for C ++ 11. Can someone please indicate where I am going wrong? (BTW, please do not offer dynamically allocated memory, since I do not have it.)
source share