You are on page 1of 18

#include <iostream>

}
};
struct AC : A{
virtual void foo() override {
cout << " hello AC " << endl;
}
};
int main() {
AB ab = AB();
AC ac = AC();
A& a = ac;
a.foo();
a.foo();
struct A {
virtual void foo() = 0;
};
struct AB : A {
virtual void foo() override {
cout << " hello AB " << endl;
}
};
struct AC : A{
virtual void foo() override {
cout << " hello AC " << endl;
}
};
int main() {
AB ab = AB();
AC ac = AC();
A& a = ac;
a.foo();
}
}
struct A {
struct AC : A{
virtual void foo() override {
cout << " hello AC " << endl;
}
};
int main() {
AB ab = AB();
AC ac = AC();
A& a = ac;
a.foo();

a.foo();
struct A {
virtual void foo() = 0;
};
struct AB : A {
virtual void foo() override {
cout << " hello AB " << endl;
}
};
struct AC : A{
virtual void foo() override {
cout << " hello AC " << endl;
}
};
int main() {
AB ab = AB();
AC ac = AC();
A& a = ac;
a.foo();
}
}
struct A {
A& a = ab;
struasdfo ict A {
virtual void foo() = 0;
};
struct AB : A { virtual void foo() override {
cout << " hello AB " << endl;
}
};
struct AC : A{
virtual void foo() override {
cout << " hello AC " << endl;
}
};
int main() {
AB ab = AB();
AC ac = AC();
A& a = ac;
a.foo();
a.foo();
struct A {
virtual void foo() = 0;
};

struct AB : A {
virtual void foo() override {
cout << " hello AB " << endl;
}
};
struct AC : A{
virtual void foo() override {
cout << " hello AC " << endl;
}
};
int main() {
AB ab = AB();
AC ac = AC();
A& a = ac;
a.foo();
}
}
struct A {
virtual void foo() = 0;
};
struct AB : A {
virtual void foo() override {
cout << " hello AB " << endl;
}
};
struct AC : A{
virtual void foo() override {
cout << " hello AC " << endl;
}
};
int main() {
AB ab = AB();
AC ac = AC();
A& a = ac;
a.foo();
struct A {
virtual void foo() = 0;
};
struct AB : A {
virtual void foo() override {
cout << " hello AB " << endl;
}
};
struct AC : A{
virtual void foo() override {
cout << " hello AC " << endl;
}

};
int main() {
AB ab = AB();
AC ac = AC();
#include <cstdlib>
using namespace std;
struct A {
virtual void foo() = 0;
};
struct AB : A {
virtual void foo() override {
cout << " hello AB " << endl;
}
};
struct AC : A{
virtual void foo() override {
cout << " hello AC " << endl;
}
};
int main() {
AB ab = AB();
AC ac = AC();
A& a = ac;
a.foo();
{
A& a = ab;
struct A {
virtual void foo() = 0;
};
struct AB : A {
virtual void foo() override {
cout << " hello AB " << endl;
}
};
struct AC : A{
virtual void foo() override {
cout << " hello AC " << endl;
}
};
int main() {
AB ab = AB();
AC ac = AC();
A& a = ac;
a.foo();
a.foo();

struct A {
virtual void foo() = 0;
};
struct AB : A {
virtual void foo() override {
cout << " hello AB " << endl;
}
};
struct AC : A{
virtual void foo() override {
cout << " hello AC " << endl;
}
};
int main() {
AB ab = AB();
AC ac = AC();
A& a = ac;
a.foo();
}
}
struct A {
virtual void foo() = 0;
};
struct AB : A {
virtual void foo() override {
cout << " hello AB " << endl;
}
};
struct AC : A{
virtual void foo() override {
cout << " hello AC " << endl;
}
};
int main() {
AB ab = AB();
AC ac = AC();
A& a = ac;
a.foo();
struct A {
virtual void foo() = 0;
};
struct AB : A {
virtual void foo() override {
cout << " hello AB " << endl;
}
};
struct AC : A{

virtual void foo() override {


cout << " hello AC " << endl;
}
};
int main() {
AB ab = AB();
AC ac = AC();
A& a = ac;
a.foo();
{
A& a = ab;
struct A {
virtual void foo() = 0;
};
struct AB : A {
virtual void foo() override {
cout << " hello AB " << endl;
}
};
struct AC : A{
virtual void foo() override {
cout << " hello AC " << endl;
}
};
int main() {
AB ab = AB();
AC ac = AC();
A& a = ac;
a.foo();
a.foo();
struct A {
virtual void foo() = 0;
};
struct AB : A {
virtual void foo() override {
cout << " hello AB " << endl;
}
};
struct AC : A{
virtual void foo() override {
cout << " hello AC " << endl;
}
};
int main() {
AB ab = AB();
AC ac = AC();
A& a = ac;

a.foo();
}
}
struct A {
virtual void foo() = 0;
};
struct AB : A {
virtual void foo() override {
cout << " hello AB " << endl;
}
};
struct AC : A{
virtual void foo() override {
cout << " hello AC " << endl;
}
};
int main() {
AB ab = AB();
AC ac = AC();
A& a = ac;
a.foo();
struct A {
virtual void foo() = 0;
};
struct AB : A {
virtual void foo() override {
cout << " hello AB " << endl;
}
};
struct AC : A{
virtual void foo() override {
cout << " hello AC " << endl;
}
};
int main() {
AB ab = AB();
AC ac = AC();
#include <cstdlib>
using namespace std;
struct A {
virtual void foo() = 0;
};
struct AB : A {
virtual void foo() override {
cout << " hello AB " << endl;
}

};
struct AC : A{
virtual void foo() override {
cout << " hello AC " << endl;
}
};
int main() {
AB ab = AB();
AC ac = AC();
A& a = ac;
a.foo();
{
A& a = ab;
struct A {
virtual void foo() = 0;
};
struct AB : A {
virtual void foo() override {
cout << " hello AB " << endl;
}
};
struct AC : A{
virtual void foo() override {
cout << " hello AC " << endl;
}
};
int main() {
AB ab = AB();
AC ac = AC();
A& a = ac;
a.foo();
a.foo();
struct A {
virtual void foo() = 0;
};
struct AB : A {
virtual void foo() override {
cout << " hello AB " << endl;
}
};
struct AC : A{
virtual void foo() override {
cout << " hello AC " << endl;
}
};
int main() {

AB ab = AB();
AC ac = AC();
A& a = ac;
a.foo();
}
}
struct A {
virtual void foo() = 0;
};
struct AB : A {
virtual void foo() override {
cout << " hello AB " << endl;
}
};
struct AC : A{
virtual void foo() override {
cout << " hello AC " << endl;
}
};
int main() {
AB ab = AB();
AC ac = AC();
A& a = ac;
a.foo();
struct A {
virtual void foo() = 0;
};
struct AB : A {
virtual void foo() override {
cout << " hello AB " << endl;
}
};
struct AC : A{
virtual void foo() override {
cout << " hello AC " << endl;
}
};
int main() {
AB ab = AB();
AC ac = AC();
A& a = ac;
cout << " hello AB " << endl;
}
};
cout << " hello AB " << endl;
}
};
struct AC : A{

virtual void foo() override {


cout << " hello AC " << endl;
}
};
int main() {
AB ab = AB();
AC ac = AC();
A& a = ac;
a.foo();
a.foo();
struct A {
virtual void foo() = 0;
};
struct AB : A {
virtual void foo() override {
cout << " hello AB " << endl;
}
};
struct AC : A{
virtual void foo() override {
cout << " hello AC " << endl;
}
};
int main() {
AB ab = AB();
AC ac = AC();
A& a = ac;
a.foo();
}
}
struct A {
struct AC : A{
virtual void foo() override {
cout << " hello AC " << endl;
}
};
int main() {
AB ab = AB();
AC ac = AC();
A& a = ac;
a.foo();
a.foo();
struct A {
virtual void foo() = 0;

};
struct AB : A {
virtual void foo() override {
cout << " hello AB " << endl;
}
};
struct AC : A{
virtual void foo() override {
cout << " hello AC " << endl;
}
};
int main() {
AB ab = AB();
AC ac = AC();
A& a = ac;
a.foo();
}
}
struct A {
A& a = ab;
struasdfo ict A {
virtual void foo() = 0;
};
struct AB : A { virtual void foo() override {
cout << " hello AB " << endl;
}
};
struct AC : A{
virtual void foo() override {
cout << " hello AC " << endl;
}
};
int main() {
AB ab = AB();
AC ac = AC();
A& a = ac;
a.foo();
a.foo();
struct A {
virtual void foo() = 0;
};
struct AB : A {
virtual void foo() override {
cout << " hello AB " << endl;
}

};
struct AC : A{
virtual void foo() override {
cout << " hello AC " << endl;
}
};
int main() {
AB ab = AB();
AC ac = AC();
A& a = ac;
a.foo();
}
}
struct A {
virtual void foo() = 0;
};
struct AB : A {
virtual void foo() override {
cout << " hello AB " << endl;
}
};
struct AC : A{
virtual void foo() override {
cout << " hello AC " << endl;
}
};
int main() {
AB ab = AB();
AC ac = AC();
A& a = ac;
a.foo();
struct A {
virtual void foo() = 0;
};
struct AB : A {
virtual void foo() override {
cout << " hello AB " << endl;
}
};
struct AC : A{
virtual void foo() override {
cout << " hello AC " << endl;
}
};
int main() {
AB ab = AB();

AC ac = AC();
#include <cstdlib>
using namespace std;
struct A {
virtual void foo() = 0;
};
struct AB : A {
virtual void foo() override {
cout << " hello AB " << endl;
}
};
struct AC : A{
virtual void foo() override {
cout << " hello AC " << endl;
}
};
int main() {
AB ab = AB();
AC ac = AC();
A& a = ac;
a.foo();
{
A& a = ab;
struct A {
virtual void foo() = 0;
};
struct AB : A {
virtual void foo() override {
cout << " hello AB " << endl;
}
};
struct AC : A{
virtual void foo() override {
cout << " hello AC " << endl;
}
};
int main() {
AB ab = AB();
AC ac = AC();
A& a = ac;
a.foo();
a.foo();
struct A {
virtual void foo() = 0;
};
struct AB : A {

virtual void foo() override {


cout << " hello AB " << endl;
}
};
struct AC : A{
virtual void foo() override {
cout << " hello AC " << endl;
}
};
int main() {
AB ab = AB();
AC ac = AC();
A& a = ac;
a.foo();
}
}
struct A {
virtual void foo() = 0;
};
struct AB : A {
virtual void foo() override {
cout << " hello AB " << endl;
}
};
struct AC : A{
virtual void foo() override {
cout << " hello AC " << endl;
}
};
int main() {
AB ab = AB();
AC ac = AC();
A& a = ac;
a.foo();
struct A {
virtual void foo() = 0;
};
struct AB : A {
virtual void foo() override {
cout << " hello AB " << endl;
}
};
struct AC : A{
virtual void foo() override {
cout << " hello AC " << endl;
}
};

int main() {
AB ab = AB();
AC ac = AC();
A& a = ac;
a.foo();
{
A& a = ab;
struct A {
virtual void foo() = 0;
};
struct AB : A {
virtual void foo() override {
cout << " hello AB " << endl;
}
};
struct AC : A{
virtual void foo() override {
cout << " hello AC " << endl;
}
};
int main() {
AB ab = AB();
AC ac = AC();
A& a = ac;
a.foo();
a.foo();
struct A {
virtual void foo() = 0;
};
struct AB : A {
virtual void foo() override {
cout << " hello AB " << endl;
}
};
struct AC : A{
virtual void foo() override {
cout << " hello AC " << endl;
}
};
int main() {
AB ab = AB();
AC ac = AC();
A& a = ac;
a.foo();
}
}

struct A {
virtual void foo() = 0;
};
struct AB : A {
virtual void foo() override {
cout << " hello AB " << endl;
}
};
struct AC : A{
virtual void foo() override {
cout << " hello AC " << endl;
}
};
int main() {
AB ab = AB();
AC ac = AC();
A& a = ac;
a.foo();
struct A {
virtual void foo() = 0;
};
struct AB : A {
virtual void foo() override {
cout << " hello AB " << endl;
}
};
struct AC : A{
virtual void foo() override {
cout << " hello AC " << endl;
}
};
int main() {
AB ab = AB();
AC ac = AC();
#include <cstdlib>
using namespace std;
struct A {
virtual void foo() = 0;
};
struct AB : A {
virtual void foo() override {
cout << " hello AB " << endl;
}
};
struct AC : A{
virtual void foo() override {
cout << " hello AC " << endl;

}
};
int main() {
AB ab = AB();
AC ac = AC();
A& a = ac;
a.foo();
{
A& a = ab;
struct A {
virtual void foo() = 0;
};
struct AB : A {
virtual void foo() override {
cout << " hello AB " << endl;
}
};
struct AC : A{
virtual void foo() override {
cout << " hello AC " << endl;
}
};
int main() {
AB ab = AB();
AC ac = AC();
A& a = ac;
a.foo();
a.foo();
struct A {
virtual void foo() = 0;
};
struct AB : A {
virtual void foo() override {
cout << " hello AB " << endl;
}
};
struct AC : A{
virtual void foo() override {
cout << " hello AC " << endl;
}
};
int main() {
AB ab = AB();
AC ac = AC();
A& a = ac;
a.foo();
}

}
struct A {
virtual void foo() = 0;
};
struct AB : A {
virtual void foo() override {
cout << " hello AB " << endl;
}
};
struct AC : A{
virtual void foo() override {
cout << " hello AC " << endl;
}
};
int main() {
AB ab = AB();
AC ac = AC();
A& a = ac;
a.foo();
struct A {
virtual void foo() = 0;
};
struct AB : A {
virtual void foo() override {
cout << " hello AB " << endl;
}
};
struct AC : A{
virtual void foo() override {
cout << " hello AC " << endl;
}
};
int main() {
AB ab = AB();
AC ac = AC();
A& a = ac;
a.foo();

You might also like