Skip to content
Snippets Groups Projects
Select Git revision
  • 08256e681ca958282c556749d6332bf473cf4251
  • master default
2 results

array-vs-pointer-1.c

Blame
  • Forked from Peter Gerwinski / hp
    Source project has a limited visibility.
    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;
    }