I'm a bit late but ...
The wiki link provided has some bad examples. Bad in that they wouldn't work for either STL vectors or arrays.
The wiki article also claims "Since a C array doesn't know its size, there can be no array assignment". That's very short-sighted.
An array is a pointer in C. If the array's declaration is in-scope, the sizeof operator can deduce the array count. Unfortunately this does not survive a function call.
static void sadness(const int array[30])
{
printf("array size is %d", sizeof array);
}
One way around this is to wrap the array declaration inside a struct. As long as the struct definition is in-scope, the sizeof operator will work, as will copy assignment.
struct buffer
{
int array[30];
};
static void happiness(const buffer *buf)
{
printf("array size is %d", sizeof buf->array);
}
That said, if you truly need variable sized arrays - an STL vector is the way to go. I often use STL vector class members for arrays just so the class destructor can take care of clean-up for me to avoid memory leaks.
At some point you may find yourself challenged to squeeze more performance when crunching lots of data in large arrays / vectors.
The STL array operator is slower that using a bare pointer so I often find myself grabbing a pointer to the data and using that inside a compute intensive loop.