error at main function

Mar 8, 2013 at 10:46pm
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 Mar 8, 2013 at 10:59pm
Mar 9, 2013 at 12:05am
closed account (Dy7SLyTq)
isnt it const int? post ur whole code
Mar 9, 2013 at 12:09am
It could be. And you can put int const, the order does not matter.
Topic archived. No new replies allowed.