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

strings-3.c

Blame
  • constructors-04.cpp 344 B
    #include <stdio.h>
    
    struct Hello
    {
      void hello ();
      Hello ();
      virtual ~Hello ();
    };
    
    void Hello::hello ()
    {
      printf ("Hello, world!\n");
    }
    
    Hello::Hello ()
    {
      printf ("constructor: Hello::Hello\n");
    }
    
    Hello::~Hello ()
    {
      printf ("destructor: Hello::~Hello\n");
    }
    
    int main ()
    {
      Hello h1;
      Hello h2 = h1;
      h2.hello ();
      return 0;
    }