C++ Operator Overloading in Class with Const Members? : <pre><code>class SomeClass {
    int someNum;
    const int someConst;
    public:
        SomeClass() : someNum(12), someConst(15)
        {
        }
        SomeClass operator+(int num) {
            SomeClass newSomeClass;
            newSomeClass.someNum += num;
            return newSomeClass;
        }
};

int main() {
    SomeClass someClass;
    SomeClass newClass;
    newClass = someClass + 3;
}
</code></pre>

<p>I don't understand why the above doesn't compile, but does so when the const related code is removed.</p>
