Matlab style indexing of C++ arrays