Thread: question aboout arguments

  1. #1
    Registered User
    Join Date
    Apr 2007
    Posts
    15

    question aboout arguments

    when can i use inline argument and default arguments?

    um.. also

    im using Quincy complier

    is there ne good free complier i can use?

  2. #2
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,412
    when can i use inline argument and default arguments?
    What do you mean by "inline argument"? Are you thinking of inline functions? You would use a default argument when you want to provide a default value for an argument, it is a little obvious in that sense.

    is there ne good free complier i can use?
    It depends on what operating system you are running, but g++ from the GNU Compiler Collection (GCC) is probably available for you. On Windows, you can use the MinGW port of GCC.
    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

  3. #3
    Registered User
    Join Date
    Apr 2007
    Posts
    15
    haha ty so much^^ u always help me^^ thnx to u i figure out the roman numeral thing^^
    oh i use window xp
    Last edited by only1st; 04-22-2007 at 08:31 PM.

  4. #4
    Anirban Ghosh
    Join Date
    Jan 2006
    Posts
    278
    Quincy is not a compiler, it is an IDE; latest version Quincy 2005! The background compiler of Quincy is "mingw".

    Yes there is a better ones such as CODE BLOCKS, DEV C++, Mingw Developer Studio and so on. All run "mingw" compiler in the background except the first one which can also run several other ones also! If you are a little experienced programmer go for CODE BLOCKS. It is an amazing IDE. Do not forget to use the nightly build to get the latest features of it. For details visit their website "www.codeblocks.org".

    The default arguments are used when there is a case that the argument has default value when not specified - as the name suggests.

    Code:
    void foo(int a , int b , int c = 1)
    {
    
        // some work
    
    }
    
    int main()
    {
        
         foo(1,2,3);  // Here c = 3, overrides the default value c = 1
    
         foo(4,5);    // Here the function foo uses the default value of c  = 1
    }

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Stack push order for function arguments
    By Mario F. in forum C++ Programming
    Replies: 12
    Last Post: 08-02-2007, 09:53 AM
  2. Command Line arguments question
    By micpi in forum C Programming
    Replies: 7
    Last Post: 04-24-2007, 08:46 PM
  3. registry, services & command line arguments.. ?
    By BrianK in forum Windows Programming
    Replies: 3
    Last Post: 03-04-2003, 02:11 PM
  4. Easy question about arguments in a function
    By pond-person in forum C++ Programming
    Replies: 5
    Last Post: 12-12-2002, 10:36 PM
  5. Very simple question, problem in my Code.
    By Vber in forum C Programming
    Replies: 7
    Last Post: 11-16-2002, 03:57 PM