about those funtions??

This is a discussion on about those funtions?? within the C++ Programming forums, part of the General Programming Boards category; some where i read that funtions are predifined code,, so my question is "what is code (excluding funtions) ^.^...

  1. #1
    Registered User
    Join Date
    Oct 2003
    Posts
    18

    about those funtions??

    some where i read that funtions are predifined code,, so my question is "what is code (excluding funtions)

    ^.^
    The woundeful Joseph Goss,,,
    e-mail me "nerdyneo@hotmail.com"
    if you want
    Ermmm,,... hello anyone there?
    i am 15

  2. #2
    Registered User
    Join Date
    Mar 2002
    Posts
    1,595
    I'd define functions as code that manipulates data (assuming you accept that operators are shorthand for functions). functions may be predefined, as in the standard libraries, or user defined.

    Code is a combination of variables, which hold data to be manipulated, functions, that do the manipulation, and control loops, that determine how often and when to do the manipulation. Of course there are many details like braces, keywords, function prototypes, preprocessor directives, namespaces and other things as well, but variables, functions, and control loops are the basic functional components of code, IMO.

  3. #3
    Hardware Engineer
    Join Date
    Sep 2001
    Posts
    1,398
    FOLDOC is a nice resource.

    Since I learned BASIC before I learned C++, I think of functions sort-of like BASIC sub-routines. A function diverts program-flow... The program goes-off and runs the function, and then returns to where it came from... perhaps returning a value to the main (or other calling) function.

    Essentially all code in C++ is in functions... main() is a function.

    Personally, I'd say that the header functions that come with your compiler and other library functions are predefined... I wouldn't consider the functions I write predefined (unless I had previously created my own library.)
    Last edited by DougDbug; 11-14-2003 at 12:47 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. These 2 recursive funtions won't work with me.
    By KidMan in forum C Programming
    Replies: 2
    Last Post: 11-04-2005, 02:03 PM
  2. The relevance of pointer to funtions
    By caroundw5h in forum C Programming
    Replies: 3
    Last Post: 02-27-2005, 07:20 PM
  3. Funtions Help
    By Rhino1775 in forum C++ Programming
    Replies: 3
    Last Post: 10-21-2003, 10:46 PM
  4. Array Funtions
    By GrlNewB in forum C++ Programming
    Replies: 8
    Last Post: 04-10-2003, 07:30 PM
  5. program that uses multiple funtions
    By mike in forum C++ Programming
    Replies: 5
    Last Post: 02-09-2002, 07:44 AM

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