Hello, I'm stuck on printing my grid from my class file to the main file.
If I pull out the print code and put in on the actual main program, it prints, but if I try to put in the class methods and call the function from main, I get an error.
[quote]
Could anyone tell me what I'm doing wrong here?
1>c:\users\nutellajelly\documents\visual studio 2012\projects\pegboard\pegboard\grid.cpp(19): error C3867: 'Grid::getStart': function call missing argument list; use '&Grid::getStart' to
create a pointer to member
1>c:\users\nutellajelly\documents\visual studio 2012\projects\pegboard\pegboard\grid.cpp(19): error C2679: binary '=' : no operator found which takes a right-hand operand of type 'DUPoint (__thiscall Grid::* )(DUPoint) const' (or there is no acceptable conversion)
1> c:\users\nutellajelly\documents\visual studio 2012\projects\pegboard\pegboard\dupoint.h(82): could be 'DUPoint &DUPoint::operator =(const DUPoint &)'
1> while trying to match the argument list '(DUPoint, DUPoint (__thiscall Grid::* )(DUPoint) const)'
1>c:\users\nutellajelly\documents\visual studio 2012\projects\pegboard\pegboard\grid.cpp(20): error C3867: 'Grid::getEnd': function call missing argument list; use '&Grid::getEnd' to create a pointer to member
1>c:\users\nutellajelly\documents\visual studio 2012\projects\pegboard\pegboard\grid.cpp(20): error C2679: binary '=' : no operator found which takes a right-hand operand of type 'DUPoint (__thiscall Grid::* )(DUPoint) const' (or there is no acceptable conversion)
1> c:\users\nutellajelly\documents\visual studio 2012\projects\pegboard\pegboard\dupoint.h(82): could be 'DUPoint &DUPoint::operator =(const DUPoint &)'
1> while trying to match the argument list '(DUPoint, DUPoint (__thiscall Grid::* )(DUPoint) const)'
1>c:\users\nutellajelly\documents\visual studio 2012\projects\pegboard\pegboard\grid.cpp(58): error C3867: 'Grid::isLegalMove': function call missing argument list; use '&Grid::isLegalMove' to create a pointer to member
1>c:\users\nutellajelly\documents\visual studio 2012\projects\pegboard\pegboard\grid.cpp(85): warning C4018: '<' : signed/unsigned mismatch
1>c:\users\nutellajelly\documents\visual studio 2012\projects\pegboard\pegboard\grid.cpp(88): warning C4018: '<' : signed/unsigned mismatch
grid.cpp(19): error C3867: 'Grid::getStart': function call missing argument list
grid.cpp(20): error C3867: 'Grid::getEnd': function call missing argument list
lines 19 and 20 - getStart and getEnd are functions that each take a parameter. You're missing the parenthesis and parameter when you try to call them on those lines.
Edit:
grid.cpp(19): error C2679: binary '=' : no operator found which takes a right-hand operand of type 'DUPoint
grid.cpp(20): error C2679: binary '=' : no operator found which takes a right-hand operand of type 'DUPoint
Same lines - What does it mean for a DUPoint to be equal to another DUPoint?
Looks like the overloaded operator in this header file takes a constant DUPoint by reference as an argument.
dupoint.h(82): could be 'DUPoint &DUPoint::operator =(const DUPoint &)'
grid.cpp(58): error C3867: 'Grid::isLegalMove': function call missing argument list
actually line 57 - isLegalMove is a function, you're missing the () and parameters in the function call