[ create a new paste ] login | about

Link: http://codepad.org/dF6WJfO7    [ raw code | output | fork ]

hmurcia - C++, pasted on Oct 28:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include <iostream>
using namespace std;

class Animal {
    int fecNac;
  public:
    Animal(int fn) {
        fecNac=fn; }
    void verFecNac() {
        cout << fecNac << endl; }
};
class Mamifero : public Animal {
};
int main() {
    Mamifero foca(12);

    foca.verFecNac();
}


Output:
1
2
3
In function 'int main()':
Line 15: error: no matching function for call to 'Mamifero::Mamifero(int)'
compilation terminated due to -Wfatal-errors.


Create a new paste based on this one


Comments: