question aboout arguments

This is a discussion on question aboout arguments within the C++ Programming forums, part of the General Programming Boards category; when can i use inline argument and default arguments? um.. also im using Quincy complier is there ne good free ...

  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
    21,450
    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.
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    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, 01:11 PM
  4. Easy question about arguments in a function
    By pond-person in forum C++ Programming
    Replies: 5
    Last Post: 12-12-2002, 09:36 PM
  5. Very simple question, problem in my Code.
    By Vber in forum C Programming
    Replies: 7
    Last Post: 11-16-2002, 02:57 PM

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