Thread: functions

  1. #1
    Registered User
    Join Date
    Aug 2001
    Posts
    380

    functions

    What's the difference between the way these two functions are declare and how does the second work?

    function(int x, int)
    {}

    function(x,y)
    int x,y;
    {}

  2. #2
    ....
    Join Date
    Aug 2001
    Location
    Groningen (NL)
    Posts
    2,380
    Both work the same, but the second one is old style.

  3. #3
    The Artful Lurker Deckard's Avatar
    Join Date
    Jan 2002
    Posts
    633
    The difference is simply the style, lambs4. They are functionally identical. The first style is the commonly used ANSI C style, and the second is the older, pre-ANSI, C style. In both cases, function accepts two arguments, both of which are integers.
    Jason Deckard

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Void Functions Help
    By bethanne41 in forum C++ Programming
    Replies: 1
    Last Post: 05-09-2005, 05:30 PM
  2. Functions and Classes - What did I do wrong?
    By redmage in forum C++ Programming
    Replies: 5
    Last Post: 04-11-2005, 11:50 AM
  3. calling functions within functions
    By edd1986 in forum C Programming
    Replies: 3
    Last Post: 03-29-2005, 03:35 AM
  4. Factory Functions HOWTO
    By GuardianDevil in forum Windows Programming
    Replies: 1
    Last Post: 05-01-2004, 01:41 PM
  5. Shell functions on Win XP
    By geek@02 in forum Windows Programming
    Replies: 6
    Last Post: 04-19-2004, 05:39 AM