Hello all I am currently having problems with defining an array of objects. I am getting 'redeclared as different kind of symbol' error message. The code is below
@MarciusV
What is wrong with line 24? It looks perfectly fine to me - read it again, it says sqrt not sqr!
As for the error, do you have any other .cpp files? Could we see them? It is possible that you have declared another global variable called system. At the very least, for that, declaring it as static PointTwoD system[50];.
Oh wow, changing the name "system" actually fixed the problem. I looked through my code to see if there was any other declaration or definition of "system" but i found none.
I think the word "system" is reserved?
Welcome to the world of usingnamespace std;.
Your compiler probably got tripped up because it thinks you're trying to redeclare the std::system function as something else.
See, just another reason not to use usingnamespace std;...
EDIT: Just tested it myself, and unfortunately, for my compiler at least, system seems to be declared in the global namespace as well (it's probably #include -ing <stdlib.h> somewhere along the line), so if that's the case for you as well, then you'll probably just have to pick a different name....