[ create a new paste ] login | about

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

hmurcia - C++, pasted on May 4:
// Objetos - constructor de clase - Herencia del constructor
// conflictos 
#include <iostream>
using namespace std;

const int MAXSIZE = 20;

class Board {
//3  protected:
    char x[MAXSIZE][MAXSIZE];
    int size;
  public:
//2    Board() {}
    Board(int t) { size = t; }
    void print();
};

class ChessBoard : Board {
  public:
//1    ChessBoard(int m) { size = m; }
    void init();
};

int main() {
    ChessBoard chess(8);
}

void Board::print() {
    //for ()
}

void ChessBoard::init() {

}


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


Create a new paste based on this one


Comments: