Parse error help please

This is a discussion on Parse error help please within the C Programming forums, part of the General Programming Boards category; Code: #include <stdio.h> #define MAX 25 int read_array(double ar[], int limit); void show_array(const double ar[], int n); double mean(const double ...

  1. #1
    Registered User
    Join Date
    Jun 2003
    Posts
    6

    Parse error help please

    Code:
    #include <stdio.h>
    #define MAX 25
    
    int read_array(double ar[], int limit);
    void show_array(const double ar[], int n);
    double mean(const double ar[], int n);
    int main(void)
    {
      double data[MAX];
      int size;
      double average;
      size = read_array(data, MAX);
      if (size == 0)
           printf("No data. Bye.\n");
      else
      {
           printf("The following numbers were entered:\n\n");
           show_array(data, size);
           printf("\nThe average of these values is %.2f.\n",
                mean(data, size));
      }
      return 0;
    }
    void show_array(const double ar[], int n);

    This line consistently gives me a parse error that says Parse Error, expecting `')'' or `',''. I surfed the Web and the FAQ's here, and they point to a missing close parens in the statement, but it is identical to the previous statement. Any help would be appreciated.

  2. #2
    Been here, done that.
    Join Date
    May 2003
    Posts
    1,157
    Works for me too under Turbo C 1.0 and Borland C 5.5
    Definition: Politics -- Latin, from
    poly meaning many and
    tics meaning blood sucking parasites
    -- Tom Smothers

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Interpreter.c
    By moussa in forum C Programming
    Replies: 4
    Last Post: 05-28-2008, 05:59 PM
  2. C++ compilation issues
    By Rupan in forum C++ Programming
    Replies: 1
    Last Post: 08-22-2005, 05:45 AM
  3. Please Help - Problem with Compilers
    By toonlover in forum C++ Programming
    Replies: 5
    Last Post: 07-23-2005, 10:03 AM
  4. Warnings, warnings, warnings?
    By spentdome in forum C Programming
    Replies: 25
    Last Post: 05-27-2002, 06:49 PM
  5. gcc problem
    By bjdea1 in forum Linux Programming
    Replies: 13
    Last Post: 04-29-2002, 06:51 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21