Hello, I'm new to C++ and I made a practice program involving methods and arrays. I ran into a compile-time error on line 8 of this program (see below), which told me - "error: expected initializer before 'int'". I am using an IDE called 'CodeBlocks'.
My program:
------------------------------------------------------------
int main () // This is line 8, there's supposed to be an error here
{
cout << "This program asks the user for 5 integer values and then outputs them in order";
cout << "\n\n";
//int accumulator = 0;
int array[5];
int currentValue;