Skip to content
Snippets Groups Projects
Select Git revision
  • 2023ss
  • 2025ss default
  • 2024ss
  • 2022ss
  • 2021ss
  • 2020ss
  • 2019ss
  • 2018ss
8 results

objects-37.cpp

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