Implicit Declaration Warning

This is a discussion on Implicit Declaration Warning within the C Programming forums, part of the General Programming Boards category; I use the snprintf function in my code.I get an implicit declaration of snprintf warning. 1)What should I do to ...

  1. #1
    Registered User
    Join Date
    Apr 2007
    Posts
    2

    Implicit Declaration Warning

    I use the snprintf function in my code.I get an implicit declaration of snprintf warning.


    1)What should I do to remove this warning?

    2)What are the reasons for such warning in general?

    3)What does this warning mean?

  2. #2
    Registered User Joelito's Avatar
    Join Date
    Mar 2005
    Location
    Tijuana, BC, México
    Posts
    308
    4) Where is your code?
    * PC: Intel Core 2 DUO E6550 @ 2.33 GHz with 2 GB RAM: Archlinux-i686 with xfce4.
    * Laptop: Intel Core 2 DUO T6600 @ 2.20 GHz with 4 GB RAM: Archlinux-x86-64 with xfce4.

  3. #3
    Registered User
    Join Date
    Apr 2007
    Posts
    2
    I dont have the code right now.Could you please tell me the resons why these warning occur?

  4. #4
    Registered User
    Join Date
    Jan 2007
    Posts
    9
    It means the function is not included in the c headers that you are ummm including. Or you didn't define the function at the beginning of your code. Or you spelled it wrong. Lets just see the code.

  5. #5
    Registered Abuser
    Join Date
    Jun 2006
    Location
    Toronto
    Posts
    591
    It means your first use of the snprintf function does not agree with another following usage in terms of paramters, more generally, this is most likely a symptom of having not included <stdio.h>
    Last edited by @nthony; 04-02-2007 at 10:39 PM.

  6. #6
    Just Lurking Dave_Sinkula's Avatar
    Join Date
    Oct 2002
    Posts
    5,006
    snprintf is C99 (in stdio.h) -- or some extension to C90.
    7. It is easier to write an incorrect program than understand a correct one.
    40. There are two ways to write error-free programs; only the third one works.*

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, 11:17 AM
  2. Screwy Linker Error - VC2005
    By Tonto in forum C++ Programming
    Replies: 5
    Last Post: 06-19-2007, 03:39 PM
  3. We Got _DEBUG Errors
    By Tonto in forum Windows Programming
    Replies: 5
    Last Post: 12-22-2006, 05:45 PM
  4. <Gulp>
    By kryptkat in forum Windows Programming
    Replies: 7
    Last Post: 01-14-2006, 01:03 PM
  5. Dikumud
    By maxorator in forum C++ Programming
    Replies: 1
    Last Post: 10-01-2005, 07:39 AM

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