title: fwrite there got bug, but i don't know how?
body: <p>help me solve this coding... it keeps said got errors :-</p>
  
  <p>it said <code>fwrite</code> there got problems..</p>
  
  <pre><code>// #define _CRT_SECURE_NO_WARNINGS
  #include &lt;stdio.h&gt;
  
      struct prod
      {
          char ProductCode [5];
          int Expired_year;
          char Product_country [25];
      }product;
      struct prod product;
  
  void main()
  {
  
      char x ;
      FILE* data;
      data = fopen("product.dat","wb");
  
      while(x != 'N')
      {
          printf("Enter product code :");
          scanf("%s", product.ProductCode);
          printf("Enter expired year of the product :");
          scanf("%d", &amp;product.Expired_year);
          fflush(stdin);
          printf("Enter product country :");
          scanf("%[^\n]", product.Product_country);
          fflush(stdin);
  
          fwrite(&amp;prod, sizeof(product), 1, data);
  
          printf("\nPlease enter anykey to continue or 'N' to stop: ");
          scanf("%c", &amp;x);
          fflush(stdin);
          printf("\n");
      }
      fclose(data);
  
  }
  </code></pre>