Thread: Inconsistent type declaration

  1. #1
    Registered User
    Join Date
    May 2003
    Posts
    1

    Inconsistent type declaration

    Trying to compile the following "makebar.c" on an HP-UX 11.0 server, and I am getting the following error,

    cc: "makebar.c", line 427: error 1584: Inconsistent type declaration: "round".

    here is the code in and around line 427,

    int round( d )
    double d;

    {
    double z;
    int i;

    i = z = floor( d );
    if ( d - z >= .5 )
    ++i;
    return i;
    }

    If anybody has any ideas I would greatly appreciate the help. Thank you in advance.

  2. #2
    Registered User
    Join Date
    Mar 2003
    Location
    UK
    Posts
    170
    >int round( d )
    >double d;
    >{

    This was the old way declaring function parameters, probably not supported by your compiler, use the following:
    Code:
    int round( double d )
    {
    }

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. sorting the matrix question..
    By transgalactic2 in forum C Programming
    Replies: 47
    Last Post: 12-22-2008, 03:17 PM
  2. Errors with including winsock 2 lib
    By gamingdl'er in forum C++ Programming
    Replies: 3
    Last Post: 12-05-2005, 08:13 PM
  3. Question on l-values.
    By Hulag in forum C++ Programming
    Replies: 6
    Last Post: 10-13-2005, 04:33 PM
  4. type declaration - dereferencing prob
    By dr$brown in forum C Programming
    Replies: 2
    Last Post: 12-24-2004, 07:05 AM
  5. Warnings, warnings, warnings?
    By spentdome in forum C Programming
    Replies: 25
    Last Post: 05-27-2002, 06:49 PM