Thread: Help with the C Tutorial on functions.

  1. #16
    Registered User
    Join Date
    Sep 2008
    Toronto, Canada
    folem001, if your variables are first defined, their type is not automatically used in the prototype. You must specify the type explicitly.

    As stated by others, the variable names in the prototype are virtually ignored by the compiler. They are used only for your own information... so you can figure out what each parameter is for.

    Prototypes are for specifying the arguments' types.

    int mult ( int,  int );
    ... is the only thing that matters to the compiler. But don't quote me on that - for all I know, this form of syntax may no longer be allowed in modern compilers.

  2. #17
    Registered User
    Join Date
    May 2010

    Thanks for your help!!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Need help with functions
    By jusfry01 in forum C Programming
    Replies: 2
    Last Post: 05-22-2010, 06:25 PM
  2. Functions calling other functions.
    By kbro3 in forum C++ Programming
    Replies: 2
    Last Post: 12-27-2009, 12:10 AM
  3. Compiling C in Visual Studio 2005
    By emanresu in forum C Programming
    Replies: 3
    Last Post: 11-16-2009, 04:25 AM
  4. Tutorial review
    By Prelude in forum A Brief History of
    Replies: 11
    Last Post: 03-22-2004, 09:40 PM
  5. Passing pointers between functions
    By heygirls_uk in forum C Programming
    Replies: 5
    Last Post: 01-09-2004, 06:58 PM

Tags for this Thread