Thread: Functions

  1. #1
    Registered User
    Join Date
    Jul 2007
    Posts
    75

    Functions

    Can someone please help me with functions by explaining what they are and how to create them (with the prototype and everything)

    Thanks

  2. #2
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Simple question, difficult answer.

    I also think you're "doing homework by asking someone else to write it for you", so if it's a homework assignment to explain funcitons, I'm not really here to help you.

    --
    Mats

  3. #3
    Registered User manofsteel972's Avatar
    Join Date
    Mar 2004
    Posts
    317
    The mathematical concept of a function expresses the intuitive idea of deterministic dependence between two quantities, one of which is viewed as primary (the independent variable, argument of the function, or its "input") and the other as secondary (the value of the function, or "output"). A function then is a way to associate a unique output for each input of a specified type, for example, a real number or an element of a given set. This definition covers most elementary functions, maps between algebraic structures, such as groups, and between geometric objects, such as manifolds. --Wikipedia

    In semantics, prototypes or prototypical instances combine the most representative attributes of a category. --Wikipedia
    "Knowledge is proud that she knows so much; Wisdom is humble that she knows no more."
    -- Cowper

    Operating Systems=Slackware Linux 9.1,Windows 98/Xp
    Compilers=gcc 3.2.3, Visual C++ 6.0, DevC++(Mingw)

    You may teach a person from now until doom's day, but that person will only know what he learns himself.

    Now I know what doesn't work.

    A problem is understood by solving it, not by pondering it.

    For a bit of humor check out xkcd web comic http://xkcd.com/235/

  4. #4
    Registered User
    Join Date
    Jul 2007
    Posts
    75
    First off im not doing my homework.
    1. It is summer
    2. I don't take a class inwhich I need to ask losers like you for help.
    3. This message bord is terdy bc everytime I ask a question all of the fruits on the message board say I am doing homework.

    GET A LIFE!!!!!!!!!

  5. #5
    The larch
    Join Date
    May 2006
    Posts
    3,573
    I think you didn't get too bad answers...

    Why do you come here and expect a stranger to write another beginner's tutorial specifically tailored for you if there are plenty around? And getting upset if not handed what you expect - isn't it a bit egoistic?

    Google, and come back with more specific questions.

    Concerning your item 3:
    When I looked at the threads you have started, you haven't been told not once to do your own homework (except here). You are building a reputation of asking awfully general questions, though, for which the correct answer is to refer you to Google, tutorials and manuals.

    Unless you go by some other name too.
    Last edited by anon; 07-30-2007 at 04:36 PM.
    I might be wrong.

    Thank you, anon. You sure know how to recognize different types of trees from quite a long way away.
    Quoted more than 1000 times (I hope).

  6. #6
    Registered User manofsteel972's Avatar
    Join Date
    Mar 2004
    Posts
    317
    A little effort goes a long way. With just a bit of research, you can find the answer to your questions. Try the FAQ, the Tutorials page, or even google to see if you can find the answer. It isn't that you are doing homework, it is that it doesn't seem like you are willing to put in any effort to find a solution yourself. If you have searched and are still confused, then at least you had put some effort in.
    Last edited by manofsteel972; 07-30-2007 at 04:36 PM.
    "Knowledge is proud that she knows so much; Wisdom is humble that she knows no more."
    -- Cowper

    Operating Systems=Slackware Linux 9.1,Windows 98/Xp
    Compilers=gcc 3.2.3, Visual C++ 6.0, DevC++(Mingw)

    You may teach a person from now until doom's day, but that person will only know what he learns himself.

    Now I know what doesn't work.

    A problem is understood by solving it, not by pondering it.

    For a bit of humor check out xkcd web comic http://xkcd.com/235/

  7. #7
    Deathray Engineer MacGyver's Avatar
    Join Date
    Mar 2007
    Posts
    3,210
    Quote Originally Posted by MaGaIn View Post
    First off im not doing my homework.
    That's great.

    Quote Originally Posted by MaGaIn View Post
    1. It is summer
    Maybe you were a moron during the regular year and you're taking summer courses. It happens.

    Quote Originally Posted by MaGaIn View Post
    2. I don't take a class inwhich I need to ask losers like you for help.
    Apparently you do if you can't read a tutorial on what a function is. This is one of the easiest concepts of C++. It only gets harder for awhile, and you need to be able to research things on your own. I think that was the point that others were trying to bring up.

    Quote Originally Posted by MaGaIn View Post
    3. This message bord is terdy bc everytime I ask a question all of the fruits on the message board say I am doing homework.
    And what are you actually doing? You want us to believe you're so motivated to learn C++ over the summer on your own time, but you can't be bothered to STW or RTM? Think that through.

    There's a lot more to programming than just knowing the basic concepts. It's also about learning how to learn. You have to be able to solve challenges you've never seen before, and learn new things on the fly. While the message board is good for asking for help, if you're using it like a personal tutor for every beginner concept, you don't have the researching skills of a good programmer.

    Quote Originally Posted by MaGaIn View Post
    GET A LIFE!!!!!!!!!
    u r 2 mean.

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