Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
1337
Language:
Ada
Assembly
Bash
C#
C++ (gcc)
C++ (clang)
C++ (vc++)
C (gcc)
C (clang)
C (vc)
Client Side
Clojure
Common Lisp
D
Elixir
Erlang
F#
Fortran
Go
Haskell
Java
Javascript
Kotlin
Lua
MySql
Node.js
Ocaml
Octave
Objective-C
Oracle
Pascal
Perl
Php
PostgreSQL
Prolog
Python
Python 3
R
Rust
Ruby
Scala
Scheme
Sql Server
Swift
Tcl
Visual Basic
Layout:
Vertical
Horizontal
//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; }
cl.exe
Show compiler warnings
[
+
] Compiler args
[
+
]
Show input
edit mode
|
history
|
discussion