File Processing

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • idle
    New Member
    • Oct 2006
    • 7

    File Processing

    What is it means File Processing consist struct ?
  • ltgbau
    New Member
    • Sep 2006
    • 41

    #2
    sorry but i think you need give us more details so that we can help you effectively

    Comment

    • idle
      New Member
      • Oct 2006
      • 7

      #3
      #include <stdio.h>
      void main (void)
      {
      int account;
      char name[30];
      float balance;

      FILE *fptr;
      if ((fptr= fopen("D:/clients.txt", "w")) == NULL)
      printf("Error: the file cannot be opened\n");
      else {
      printf("Enter the account #, name and balance or EOF to end input:\n");
      scanf("%d %s %f", &account, &name, &balance);
      while (!feof(stdin)) {
      fprintf(fptr, "%d %s %.2f\n", account, name, balance);
      scanf("%d%s%f", &account, &name, &balance);
      }
      }
      fclose(fptr);
      }




      this is the example.
      how can we include struct in it.

      Comment

      Working...