I am getting some errors when compiling my program but I am unsure as to what to do to fix them. Any help or suggestions would be appreciated.
These are the errors:
Program4.cpp: In function `int main()':
Program4.cpp:23: error: expected primary-expression before "const"
Program4.cpp:23: error: expected `;' before "const"
Program4.cpp:24: error: `size' undeclared (first use this function)
Program4.cpp:24: error: (Each undeclared identifier is reported only once for each function it appears in.)
Program4.cpp:24: error: expected primary-expression before "double"
Program4.cpp:24: error: expected `;' before "double"
Program4.cpp:26: error: `scoreList' undeclared (first use this function)
The object of the program is to process the test scores of students in a class of 10 students.
These errors happens because your compiler seems using the C++ rules of a pre C++ 11 standard, and therefore it cannot handle assigning via type var {value};.
You could either change line 11 to constint size = 10;, or, if you use the clang++ or g++ compiler, then add to your compilation command a flag like -std=c++11 or -std=c++14 or -std=c++17.