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
get_number_of_threads, windows
msvc compile optimization demo...
xxx
Copy_and_base
error_code example
Static cast of Enum
why fatal error C1083
Dices by GOOSE
parameter pack workaround
Computing the factorial of an integer using factorial and iteration