Thread: compile Error concerning array formal

  1. #1
    Registered User
    Join Date
    Oct 2001
    Posts
    15

    Cool compile Error concerning array formal

    Hello fellow programmers,
    i would greatly appreciate some help with the following

    void inum_sort (int array1[], int *num1);

    void
    main (void)
    {
    inum_sort (array1, &num1);
    }

    void
    inum_sort (int array1[],
    int *num1);

    which I thought was fine but I am getting the following compile error

    C:\Program Files\Microsoft Visual Studio\MyProjects\(46) : error C2447: missing function header (old-style formal list?)

    Can any one Help? Is so Thank you!!!

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,662
    > inum_sort (array1, &num1);
    array1 and num1 are undeclared

    > void main
    main returns an int

    > void inum_sort (int array1[], int *num1);
    Is prototyped twice

    Better post what you actually tried to compile, not some paraphrasing for the board.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  3. #3
    Registered User
    Join Date
    Oct 2001
    Posts
    15

    Thumbs up Disregard but thx anyway

    Thanks,
    but shortly after i posted this i found my mistake it was that i put
    semi-colons ";" at the end of my function headers

    adios muchachoes!!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 7
    Last Post: 11-25-2008, 01:50 AM
  2. incrementing an array as formal arg
    By vaibhav in forum C++ Programming
    Replies: 5
    Last Post: 12-27-2005, 08:53 AM
  3. Struct *** initialization
    By Saravanan in forum C Programming
    Replies: 20
    Last Post: 10-09-2003, 12:04 PM
  4. Array Program
    By emmx in forum C Programming
    Replies: 3
    Last Post: 08-31-2003, 12:44 AM
  5. two dimensional dynamic array?
    By ichijoji in forum C++ Programming
    Replies: 6
    Last Post: 04-14-2003, 04:27 PM