C Headerfile problems

This is a discussion on C Headerfile problems within the C Programming forums, part of the General Programming Boards category; I am trying to run a programm which asks arithmatic questions. I am getting an error "declaration terminated incorrectly" in ...

  1. #1
    hireintelligence
    Guest

    C Headerfile problems

    I am trying to run a programm which asks arithmatic questions. I am getting an error "declaration terminated incorrectly" in the header file; here are the codes; Please let me know if you can find the prob. Thanxxxx

    /*
    * File: RandDef.h
    * Header file for RandDef.c, source file of definitions of
    * random number generating functions
    */

    #ifndef RANDOM
    #define RANDOM

    #include <stdlib.h>
    #include <time.h>

    void SeedRand(void);
    float random_float(void);
    float random_float_range(float LowerBound, float UpperBound);

    int random(int UpperBound); (THIS IS WHERE IT SAYS INCORRECT DECLARATION) ?????????

    int random_range(int LowerBound, int UpperBound);

    #endif

  2. #2
    Registered User
    Join Date
    Jan 2002
    Location
    Vancouver
    Posts
    2,220
    I think random() is already defined in stdlib.h, try changing it's name.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. No clue how to make a code to solve problems!
    By ctnzn in forum C Programming
    Replies: 8
    Last Post: 10-16-2008, 03:59 AM
  2. C Pointers Problems
    By mhelal in forum C Programming
    Replies: 8
    Last Post: 01-10-2007, 06:35 AM
  3. String Manipulation problems -_-
    By Astra in forum C Programming
    Replies: 5
    Last Post: 12-13-2006, 05:48 PM
  4. contest problems on my site
    By DavidP in forum Contests Board
    Replies: 4
    Last Post: 01-10-2004, 09:19 PM
  5. DJGPP problems
    By stormswift in forum C Programming
    Replies: 2
    Last Post: 02-26-2002, 04:35 PM

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