fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. class B {
  5. };
  6. class D : public const B {
  7. };
  8.  
  9. int main() {
  10. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:6:18: error: expected class-name before ‘const’
prog.cpp:6:18: error: expected ‘{’ before ‘const’
prog.cpp:6:26: error: invalid type in declaration before ‘{’ token
prog.cpp:6:26: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11 [enabled by default]
prog.cpp:7:1: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11 [enabled by default]
stdout
Standard output is empty