Beispiel #1
0
// end
int main(int argc, char* argv[]) {
    CType obj;
    int n;
    cin >> n;
    while (n) {
        obj.setvalue(n);
        cout << obj++ << " " << obj << endl;
        cin >> n;
    }
    return 0;
}
Beispiel #2
0
CType& CType::operator++(int){
        CType* temp = new CType();
        temp->setvalue(num);
        num = num * num;
        return *temp;
}