codepad
[
create a new paste
]
login
|
about
Language:
C
C++
D
Haskell
Lua
OCaml
PHP
Perl
Plain Text
Python
Ruby
Scheme
Tcl
#include <iostream> struct Base { Base() { std::cout << typeid(*this).name() << std::endl; } virtual ~Base() { std::cout << "~" << typeid(*this).name() << std::endl; } void Init() const { std::cout << typeid(*this).name() << std::endl; } }; struct Derived : public Base { }; int main() { Derived d; d.Init(); return 0; }
Private
[
?
]
Run code
Submit