Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
my override
//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
HexDong
Fun with Pointers #1
hello world 3
Calculate H.C.F using recursion
template specialization inheritance problem
boost tokenizer
FUCK
Assignment Operator Example
Bubble Sort Example
pack expansion