This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Initialize C ++ object array in constructor?

I am facing issues with initialization of an object array within the Constructor. I would like to initialize my array using initialization from brace-enclosed lists. But the armcc compiler for some reason, doesn't compile my code nor throw me a warning!

For example, the array would be of "Component" type:

Next, the "Device" class, would utilize the "Component" in an array.

Now, within the Device.cpp, I try to initialize the array in the default constructor call as:

I have set my compilation flags to -cpp11. Also, this code compiles on a "arm-none-eabi-g++" compiler.

Why am I not able to compile this on armcc 5.06?

0