I want to reverse a 2d array of type char
using std::reverse()
function in the STL algorithm.
#include <iostream>
#include <algorithm>
int main()
{
char array[10][5];
initiate_array(array); // this takes care of initializing array
std::reverse(array, array + 10); // <- error C2075
return 0;
}
But I keep getting this error: C2075: '_Tmp' : array initialization needs curly braces
which I never encountered before!
I use MSVC++ 2008 to compile my code.