Run Code
|
API
|
Code Wall
|
Users
|
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
Please
log in
to post a comment.
Vector of pointer of P...
applidiumResto_corrigé
Apple is not convertible to itself (clang 3.8.0)
BinaryGap, C++ - Find longest sequence of zeros in binary representation of an integer.
Calculate H.C.F using recursion
GreedyProblem1
enum operator
NaN inside set
Fun with Pointers #2
C++ Register
Please log in to post a comment.