[ create a new paste ] login | about

Link: http://codepad.org/9cf7ZWK2    [ raw code | fork ]

C++, pasted on May 24:
1
2
3
4
5
6
7
8
struct A { };
struct B : virtual A { };
struct C : virtual A, B { };
int main() {
  C *c = 0;
  B *b = c;
  c = static_cast<C*>(b);
}


Output:
No errors or program output.


Create a new paste based on this one


Comments: