Thread: previous implicit declaration of 'differences' was here

  1. #1
    Registered User
    Join Date
    Sep 2008
    Posts
    16

    previous implicit declaration of 'differences' was here

    does anyone know what this error message means?

    i am using a function that i have not previously declared (because i cannot get that to work... another story) and this is the message it gives me.

    when i declare it up top, it gives me the same message up there

    any thoughts on what this means? any responses are greatly appreciated this is very frustrating

  2. #2
    Registered User
    Join Date
    Sep 2008
    Posts
    16
    'differences' is the function name

  3. #3
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,336
    That's exactly what the error message is telling you: you are using a function that you have not previously declared.

    You need at least a prototype, if not the function definition, before any call to that function is made.

  4. #4
    Registered User
    Join Date
    Sep 2008
    Posts
    16
    i have used the declaration

    void function(int, float, int, int, float);

    and then where i do that it tells me "previous declaration of 'function' was here

  5. #5
    Registered User
    Join Date
    Sep 2008
    Posts
    16
    also i should add-- thank you for your response

  6. #6
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,336
    Is that the previous declaration, or is that the line with the warning? 'Cause there are going to be two different lines listed here, obviously; the first line where the error is, and then a different line where the previous declaration was.

    Anyway, the two don't match (the use and the declaration). So fix that.

    Edit: To be more specific, your file must look like the following:
    Code:
    void function(int, float, int, int, float);
    
    int main(void) {
        /* things happen here */
    }
    
    void function(int a, float b, int c, int d, float e) {
        /* the actual function is here */
    }
    Last edited by tabstop; 10-22-2008 at 07:48 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Quantum Random Bit Generator
    By shawnt in forum C++ Programming
    Replies: 62
    Last Post: 06-18-2008, 10:17 AM
  2. failure to import external C libraries in C++ project
    By nocturna_gr in forum C++ Programming
    Replies: 3
    Last Post: 12-02-2007, 03:49 PM
  3. We Got _DEBUG Errors
    By Tonto in forum Windows Programming
    Replies: 5
    Last Post: 12-22-2006, 05:45 PM
  4. Errors with including winsock 2 lib
    By gamingdl'er in forum C++ Programming
    Replies: 3
    Last Post: 12-05-2005, 08:13 PM
  5. Dikumud
    By maxorator in forum C++ Programming
    Replies: 1
    Last Post: 10-01-2005, 06:39 AM