Thread: help

  1. #1
    Registered User
    Join Date
    Mar 2005
    Posts
    9

    help

    Thanks man. I get the following errors:
    ass.c: In function `open_batch':
    ass.c:112: warning: assignment makes pointer from integer without a cast



    Code:
    void open_batch()
    {
       FILE *fp;
       char f[100];
       char c;
       int a = 0, b = 0;
       int d, e, g, h, i, j, k, l;
       printf("Please enter the file you wish to run: ");
       scanf("%s", &f);
       if((fp = fopen(f,"rt") == NULL))    //ERROR IS HERE
       {
          printf("No such file");
       }
    
       while(fp = fopen(f,"rt") == NULL)   //ERROR ALSO HERE
       {
          c = fgetc(file);
          ...
          ...

  2. #2
    Registered User
    Join Date
    Apr 2004
    Posts
    173
    Please don't open multiple threads on the same topic. You could of just posted in your original thread.

Popular pages Recent additions subscribe to a feed