sebastian_k
0
Q:

estructura c++

struct Par 
{
    int a, b;
    // constructor base
    Par() { a = b = 0; }
    // destructor base
    ~Par() { cout << "hecho..." << endl; }
    void setA(int n) { a = n; }
    void setB(int n) { b = n; }
    void mostrar() 
    {
        cout << "a = " << a << ", b = " << b << "; suma = " << a+b << endl;
    }
};
1

New to Communities?

Join the community