Skip to content
Snippets Groups Projects
Select Git revision
  • 2023ws
  • 2024ws default
  • 2022ws
  • 2021ws
  • 2020ws
  • 2018ws
  • 2019ws
  • 2017ws
  • 2016ws
9 results

strings-07c.c

Blame
  • objects-38.cpp 277 B
    #include <stdio.h>
    
    class TFoo
    {
    private:
      static int content;
    
    public:
    
      TFoo (int i)
      {
        content = i;
      }
    
      static void hello ()
      {
        printf ("The answer is: %d\n", content);
      }
    
    };
    
    int TFoo::content;
    
    int main ()
    {
      TFoo bla (42);
      bla.hello ();
      return 0;
    }