title: Struct pointer ? Something goes wrong
body: <p>Hi I am trying to make a program with pointer in a struct. Compiler appears no problems but the program crashes.
  Could you help me please ?</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  #include &lt;errno.h&gt;
  #include &lt;string.h&gt;
  
  int pos;
  
  typedef struct _Parking Parking;
  
  struct _Parking
  {
      int   pos;    
      char  name[15];       
      char  description[80];  
      float price;         
      int   slots[5];       
      char  last_driver_id;    
      int   reservations;   
  };
  
  Parking *myaccounts;
  
  int create_Parking()
  {
      strcpy(myaccounts-&gt;name,"Pro");
      myaccounts-&gt;pos ++;
  
      return pos-1;               
  }
  
  int main()
  {
  
      int a;
  
      a = create_Parking();
  
      printf("a=%d\n",a);
      printf("name=%s\n",myaccounts-&gt;name);
  
      system("pause");    
      return 0;    
  }
  </code></pre>