fork download
  1. #include <iostream>
  2. #include <string>
  3.  
  4. class whatAmIEvenDoing {
  5. public:
  6. static std::string what;
  7. };
  8.  
  9. // required definition, don't put it in the header
  10. std::string whatAmIEvenDoing::what = "I don't know!";
  11.  
  12. int main()
  13. {
  14. // look ma, no instantiated objects!
  15. std::cout << whatAmIEvenDoing::what << std::endl;
  16. }
  17.  
Success #stdin #stdout 0.02s 2812KB
stdin
Standard input is empty
stdout
I don't know!