Is there a way in C++ where an objects has argument added upon it, with an array such as:
int x = 1;
int y = 2;
Object myObject( x, y )[5]; // does not work
When constructing an array of objects in C++ only the default constructor can be used unless you're using the explicit Array initialization syntax:
Object myObject[5] = { Object( x, y ),
Object( x, y ),
Object( x, y ),
Object( x, y ),
Object( x, y ) }
Here's some good information from the C++ FAQ about this:
http://www.parashift.com/c++-faq-lite/ctors.html#faq-10.5