Like Tree3Likes
  • 3 Post By laserlight

function prototypes

This is a discussion on function prototypes within the C Programming forums, part of the General Programming Boards category; can function prototypes be mentioned inside the main function , before the definition of functions? or is it that all ...

  1. #1
    Registered User
    Join Date
    Dec 2010
    Posts
    16

    function prototypes

    can function prototypes be mentioned inside the main function , before the definition of functions? or is it that all prototypes to be mentioned in the beginning of the source code before main() ?

  2. #2
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    23,618
    Quote Originally Posted by kawaikx15
    can function prototypes be mentioned inside the main function , before the definition of functions?
    Yes. Next time, write a program and see if it works, then ask to check if your observation is compiler specific.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Function Prototypes
    By askinne2 in forum C Programming
    Replies: 6
    Last Post: 10-01-2010, 01:01 PM
  2. Function prototypes
    By XxPKMNxX in forum C Programming
    Replies: 4
    Last Post: 10-28-2009, 02:33 AM
  3. Function Prototypes
    By Kryota in forum C++ Programming
    Replies: 11
    Last Post: 12-28-2007, 03:52 AM
  4. 2 function prototypes
    By newbie101 in forum C++ Programming
    Replies: 3
    Last Post: 05-09-2006, 05:49 AM
  5. Question about function prototypes
    By Mikecore in forum C Programming
    Replies: 2
    Last Post: 11-20-2005, 04:39 PM

Tags for this Thread


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