If you are programming in C++ and are looking to declare an array of variable size, then odds are you don't want to use a "built-in" C style "array". It's sort of a nuts-and-bolts tool.
You probably want to use std::vector instead. It is a class which is more flexible and does not require a size to be specified at the point of declaration. You can look for tutorials on its use around the web, but here's a random one from Google:
http://www.yolinux.com/TUTORIALS/LinuxTutorialC++STL.html#VECTOR
An interesting aspect of C++ is that even though vectors are "library code" and a class you could have potentially written yourself without modifying the compiler, they allow for access with notational conveniences like brackets. Some pros from the faq and some cons from the fqa presented here, take both sides with a grain of salt:
http://yosefk.com/c++fqa/operator.html
While there are some performance benefits to using the bare metal abstraction of a C-style array, std::vector is almost certainly faster than Java arrays and are a better choice much of the time.