Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
1337
//g++ 7.4.0 #include <iostream> struct A { static void foo() { std::cout << "static void A::foo()" << std::endl; } }; struct B : public A { virtual void foo() { std::cout << "virtual void B::foo()" << std::endl; } virtual ~B() = default; }; struct C : public B { void foo() override { std::cout << "void C::foo() override" << std::endl; } }; int main() { A a; B b; C c; B *cb = new C(); A::foo(); a.foo(); b.foo(); c.foo(); cb->foo(); delete cb; }
run
|
edit
|
history
|
help
0
Unqualified free functions
hello,world !ssn2019
Move Construction
appliWall
DESim Example
Non type template argument
chakib
Store Information in Structure and Display it
pack expansion
Random values and probability distribution