myint.cpp: In function
MyInt operator+(const MyInt&, const MyInt&)': myint.cpp:193: error: passing
const MyInt' asthis' argument of
void MyInt::Grow()' discards qualifiers myint.cpp:194: error: passingconst MyInt' as
this' argument ofvoid MyInt::Grow()' discards qualifiers myint.cpp:219: error:
array' undeclared (first use this function) myint.cpp:219: error: (Each undeclared identifier is reported only once for each function it appears in.) myint.cpp: In functionMyInt operator*(const MyInt&, const MyInt&)': myint.cpp:252: error: passing
const MyInt' asthis' argument of
void MyInt::Grow()' discards qualifiers myint.cpp:262: error: passingconst MyInt' as
this' argument ofvoid MyInt::Grow()' discards qualifiers myint.cpp:290: error: invalid conversion from
int*' toint' myint.cpp:290: error: initializing argument 1 of
MyInt::MyInt(int)'bigint 클래스에서 +와 *에 연산자 오버로딩을하는 동안 한정자가 버려진 곳에서 오류가 발생합니다.
모두 도움이 될 수 있으므로 제 실수입니다.
내 코드는 codepad에서
당신은 그 멤버 함수들을'const' 할 필요가 있다고 생각합니다. – 0x499602D2