Your second loop should use j as a subscript for your array, not i
If you wrote
for( int i = 0; i < MAXSIZE; ++i )
rather than declaring the variable at the start (in C style), then a newer compiler would have made i go out of scope, and you would have gotten a nice warning about using the i subscript where you shouldn't have.
Salem
Posting Sage
11,531 posts since Dec 2005
Reputation Points: 5,862
Solved Threads: 953
> int const MAXSIZE = 100, input = 0;
Well you need to declare input separately, it thinks it's supposed to be constant.
Which isn't so good when you try and input.
Also, you're missing some 'int' declarations in your for loops.
Salem
Posting Sage
11,531 posts since Dec 2005
Reputation Points: 5,862
Solved Threads: 953