title: Not declared in this scope(error in C language)
body: <p>I have these pieces of code:
  Header:</p>
  
  <pre><code>#ifndef hotel
  #define hotel
  typedef struct hotel
  {
         char name_of_H[50];
         char adress[50];
         int nr_rooms;
         int floors;
         float stars;
  }HOTEL;
  void inputh(HOTEL *h, int n);
  void outputh(HOTEL *h, int n);
  int searchh( HOTEL *h, int n, char *key);
  void swaph( HOTEL *h, int k1, int k2);
  void sorth( HOTEL *h, int n);
  void modifyh(HOTEL *h, int k);
  int writeh(HOTEL *h, int n, char * fname);
  HOTEL* appendh(HOTEL *h, int *n,HOTEL newh);
  HOTEL* inserth(HOTEL *h, int *n, int k,HOTEL newh);
  HOTEL* delh(HOTEL *h  , int *n, int k);
  #endif
  </code></pre>
  
  <p>Prototype of functions(just 2 of them):</p>
  
  <pre><code>   HOTEL* appendh(HOTEL *h, int *n, HOTEL newh)
       {  int i;
  HOTEL *p;
  p=(HOTEL *)realloc(h,(*n+1)*sizeof(*p));
  if (p==NULL) {return p;}
  p[*n]= newh;
  *n=*n+1;
  return p;
  }
  HOTEL* inserth(HOTEL *h, int *n, int k,HOTEL newh)
  {  int i;
  HOTEL *p;
  p=(HOTEL*)realloc(h,(*n+1)*sizeof(*p));
  if (p==NULL) {return p;}
  for(i=*n; i&gt;k; i--)
  { p[i]= p[i-1]; }
   p[k]= newh;
  *n=(*n)+1;
  return p;
  }
  </code></pre>
  
  <p>And in main:</p>
  
  <pre><code>printf("Enter information about hotel:");
      printf("Name of hotel: "); fflush(stdin);
      gets(newh.name_of_H);//here is the error
      printf("Adress of hotel:     "); fflush(stdin);
      gets(newh.adress);
      printf("Number f rooms:       "); scanf("%d", &amp;newh.nr_rooms);
      printf("Floors:      "); scanf("%d", &amp;newh.floors);
      printf("Stars: "); scanf("%f", &amp;newh.stars);
      printf("Enter position for insertion:  ");
      scanf("%d", &amp;k);
      p=inserth(h, n, k, newh); if (p==NULL)
      {puts("memory was not reallocated");}
      else {h=p;}
      getch( ); break;
  </code></pre>
  
  <p>('newh was not decl. in this  scope')Newh is a struct variable with fields name, adress,...why i got error when i tried to input info?Thanks!</p>