Thread: default parameters in C++

  1. #1
    Registered User
    Join Date
    Sep 2009
    Posts
    41

    default parameters in C++

    i dont know "Describe default parameters in C++" can everybody help me , explain it.
    Thanks

  2. #2
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,708
    Have you already been here?

  3. #3
    Registered User
    Join Date
    Sep 2009
    Posts
    41
    yes, i have, but i need understand detail, and simple. can u help me.

  4. #4
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    What is it that you fail to understand? Or do you understand everything but cannot find a way to formulate how they work or something else?
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  5. #5
    Registered User
    Join Date
    Sep 2009
    Posts
    41
    maybe. but i am newbie in C++, so i need you help, reality i have one pratice relative with problem this. its theory . thanks .
    Last edited by llynx; 09-27-2009 at 10:37 AM.

  6. #6
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,708
    Let's start over here:

    1) What part do you understand? Be specific, and explain in detail.
    2) What part do you *not* understand? Be specific, and explain in detail.

  7. #7
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,195
    In my 15 years of using C/C++ I've never used default parameters...
    If you are a C++ newbie why are you even worrying about them so soon?

    It really doesn't get any easier than this.

  8. #8
    Registered User
    Join Date
    Sep 2009
    Posts
    41
    if you use OOP sure used default parameters, why do you talked dont use this?

  9. #9
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    Quote Originally Posted by llynx
    if you use OOP sure used default parameters, why do you talked dont use this?
    That does not really make sense to me, partly because the sentence sounds incoherent. If I understand you correctly, you are saying that if you have used OOP you would have used default arguments, but default arguments is not a feature of OOP.
    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. Utilizing another compiled program for a task.
    By kotoroshinoto in forum C Programming
    Replies: 6
    Last Post: 06-03-2008, 01:43 PM
  2. Help with default parameter value using ptr-to-functor
    By registering in forum C++ Programming
    Replies: 2
    Last Post: 03-24-2004, 04:21 PM
  3. Default Constructors w/Classes as Parameters
    By GrNxxDaY in forum C++ Programming
    Replies: 22
    Last Post: 07-31-2002, 07:50 AM
  4. Switching Default Buttons :: MFC
    By kuphryn in forum Windows Programming
    Replies: 2
    Last Post: 07-02-2002, 04:08 PM
  5. Help with default parameters
    By incognito in forum C++ Programming
    Replies: 1
    Last Post: 11-12-2001, 07:44 PM