fork(4) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. class IFoo
  5. {
  6. public:
  7. static const std::string txt("abc"); //geht nicht
  8. virtual int bar() = 0;
  9. };
  10.  
  11. int main() {
  12. // your code goes here
  13. return 0;
  14. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:7:33: error: expected identifier before string constant
    static const std::string txt("abc"); //geht nicht
                                 ^
prog.cpp:7:33: error: expected ‘,’ or ‘...’ before string constant
stdout
Standard output is empty