/* Solution file */
class Test {
public:
Test(int n) : n(n) {}
~Test() {
print();
}
void print() {
cout << n << endl;
}
private:
int n;
};
void solve(istream& in, ostream& out) {
Test a(1000);
}
/* Submission.cpp: no method "Test::print()" that is called from destructor (destructor is not called explicitly, only by default on exit from function solve() ) */
class Test {
public:
Test(int n) : n(n) {}
~Test() {
print();
}
private:
int n;
};
void solve(istream& in, ostream& out) {
Test a(1000);
}