Description Resource Path Location Type
Invalid overload of 'endl' CRectangle.cpp /Rectangle line 85 Semantic Error
Method 'getX' could not be resolved CRectangle.cpp /Rectangle line 85 Semantic Error
Method 'getX' could not be resolved CRectangle.cpp /Rectangle line 85 Semantic Error
Method 'getY' could not be resolved CRectangle.cpp /Rectangle line 85 Semantic Error
Method 'getY' could not be resolved CRectangle.cpp /Rectangle line 85 Semantic Error
non-const lvalue reference to type 'std::__1::ostream' (aka 'basic_ostream<char>') cannot bind to a value of unrelated type 'const CRectangle' CRectangle.cpp /Rectangle line 86 C/C++ Problem
Symbol 'bottomLeft' could not be resolved CRectangle.cpp /Rectangle line 85 Semantic Error
Symbol 'bottomLeft' could not be resolved CRectangle.cpp /Rectangle line 85 Semantic Error
Symbol 'fillChar' could not be resolved CRectangle.cpp /Rectangle line 85 Semantic Error
Symbol 'topRight' could not be resolved CRectangle.cpp /Rectangle line 85 Semantic Error
Symbol 'topRight' could not be resolved CRectangle.cpp /Rectangle line 85 Semantic Error
use of undeclared identifier 'bottomLeft' CRectangle.cpp /Rectangle line 85 C/C++ Problem
use of undeclared identifier 'fillChar' CRectangle.cpp /Rectangle line 85 C/C++ Problem
use of undeclared identifier 'topRight' CRectangle.cpp /Rectangle line 85 C/C++ Problem
make: *** [CRectangle.o] Error 1 Rectangle C/C++ Problem
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83
|
#include "CRectangle.h"
#include "CPoint.h"
CRectangle::CRectangle(char fillChar)
{
m_fillChar = fillChar;
}
CRectangle::CRectangle(CPoint bottomLeft, CPoint topRight, char fillChar)
{
m_bottomLeft = bottomLeft;
m_topRight = topRight;
m_fillChar = fillChar;
if(topRight.getX() < bottomLeft.getX()){
topRight.setX(bottomLeft.getX());
}
if(topRight.getY() < bottomLeft.getY()){
topRight.setY(bottomLeft.getY());
}
}
void CRectangle::setCorners(CPoint bottomLeft, CPoint topRight)
{
if (bottomLeft.getX()<= topRight.getX() && bottomLeft.getY() <= topRight.getY()) {
m_bottomLeft = bottomLeft;
m_topRight = topRight;
}
}
CPoint CRectangle::getBottomLeftCorner() const
{
// Bitte implementieren und dabei das return-Statement ersetzen.
return m_bottomLeft;
}
CPoint CRectangle::getTopRightCorner() const
{
// Bitte implementieren und dabei das return-Statement ersetzen.
return m_topRight;
}
void CRectangle::setFillChar(char fillChar)
{
m_fillChar = fillChar;
}
char CRectangle::getFillChar() const
{
// Bitte implementieren und dabei das return-Statement ersetzen.
return m_fillChar;
}
bool CRectangle::operator ==(const CRectangle& other) const
{
// Bitte implementieren und dabei das return-Statement ersetzen.
return false;
}
void CRectangle::draw(CScreen& screen) const
{
// Bitte implementieren
}
ostream& operator<< (ostream& lhs, const CRectangle& rhs){
lhs << "CRectangle(" << bottomLeft.getX() << "," << bottomLeft.getY() << "),(" << topRight.getX() <<","<< topRight.getY()<< fillChar << endl;
return rhs;
}
|
Still the error exist?