I am currently writting a code for my programming class and have come across this error. I do not know how to fix it and was wondering if someone can help me or give me some hints.

for (index = 1; index < SIZE; ++);
            if (values[index] < lowest)
                    lowest = values[index];

error: "project_5.cpp(44): error C2059: syntax error : ')'"

First, array indices in C/C++ are zero-based, not 1 based like some languages we won't mention here, UNLESS you want to skip over the first element...
Secondly, you need to remove the semi-colon from then end of line 1. :-)

when I take off the ; in line one it now has an error that says:
"project_5.cpp(45): error C2143: syntax error : missing ';' before '{'"

You two errors on line one

for (index = 1; index < SIZE; ++);

for (index = 1; index < SIZE; ++index)

I edited this post and put it to a new thread since this is marked solved.

Edited 3 Years Ago by whatthebobo: written above

This question has already been answered. Start a new discussion instead.