error at main function

Here is the code that I am getting the error at:
1
2
3
4
5
6
7
8
9
10
11
int main() {
	int const N = 10;
	int a, b;
	int flow[N]={1,2,3,4,5,6,7,8,9,10};

	display(flow, N);
	cout << "Which two offsets would you like me to swap? " << endl;
	cin >> a >> b;
	swap(flow, N, a, b);
	return 0;
}

The error says: Multiple markers at this line. A function definition is not allowed here before the '{' token. Syntax error.



Is it possible that one of my function declarations are messing it up? I am getting no errors for my functions above this, but I really cannot explain this.
Last edited on
closed account (Dy7SLyTq)
isnt it const int? post ur whole code
It could be. And you can put int const, the order does not matter.
Topic archived. No new replies allowed.