Since you are new to arrays, I bet you tried to use reverse like this: reverse (array[0], array[n]), or something like that.
But, if you read the reference you'll see that both use "iterators", and basicly what those are, is pointers. So, use it like this:
#include <iostream>
#include <string>
#include <cstring>
#include <algorithm>
usingnamespace std;
int main()
{
constint SIZE = 5; // must be a constant variable
int myArray[SIZE];
cout << "Enter 5 Numbers: "<< endl;
for(int i = 0; i < SIZE; i++)
{
cin >> myArray[i];
}
reverse(myArray, myArray+SIZE);
cout << "Your 5 numbers are: ";
for(int i = 0; i < SIZE; i++)
{
cout << myArray[i] << " ";
}
//system("pause"); // pause system
return 0;
}
As you can see, i used myArray without the bracket operator. That meant i used a pointer(aka "iterator") to the beggining, and one space after the end of the array.