fork(3) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. class Frabjous {
  5. private:
  6. char fab[20];
  7. public:
  8. Frabjous(const char * s = "C++") : fab(s) { }
  9. virtual void tell() { cout << fab; }
  10. };
  11.  
  12. int main() {
  13.  
  14. return 0;
  15. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In constructor 'Frabjous::Frabjous(const char*)':
prog.cpp:8:42: error: incompatible types in assignment of 'const char*' to 'char [20]'
  Frabjous(const char * s = "C++") : fab(s) { }
                                          ^
stdout
Standard output is empty