C++ Flags

Discussion in 'C++' started by Andry, Jan 4, 2008.

  1. Andry

    Andry Guest

    What kind of flag's I should Use to compile a C++ Program?
    Andry, Jan 4, 2008
    #1
    1. Advertising

  2. Andry

    Rolf Magnus Guest

    Andry wrote:

    > What kind of flag's I should Use to compile a C++ Program?


    Even though most CPUs make use of "flags" to maintain some internal state
    that describes (often among other things) the result of the last arithmetic
    or logic instruction, C++ doesn't offer such a concept. You should just
    forget about them unless you need some inline assembler. Then, your CPU's
    data sheet our assembler instruction manual might be of use.
    Rolf Magnus, Jan 4, 2008
    #2
    1. Advertising

  3. Andry

    Guest

    On Jan 4, 11:00 am, Andry <> wrote:
    > What kind of flag's I should Use to compile a C++ Program?


    You should check your compiler's documentation.

    Regards.
    , Jan 4, 2008
    #3
  4. Andry

    Ron AF Greve Guest

    Hi,

    If you use gnu c++ and you have all the source in one C++ file optimization
    level2

    g++ -Wall -O2 myprogram.cc -o myprogram

    In Visual C++ just hit F7
    Or select release build and hit F7 (for the release version without
    debugging stuff)

    Regards, Ron AF Greve

    http://www.InformationSuperHighway.eu

    "Andry" <> wrote in message
    news:...
    > What kind of flag's I should Use to compile a C++ Program?
    Ron AF Greve, Jan 4, 2008
    #4
  5. Andry

    red floyd Guest

    Andry wrote:
    > What kind of flag's I should Use to compile a C++ Program?


    I prefer a pirate flag.
    red floyd, Jan 4, 2008
    #5
  6. Andry

    Jack Klein Guest

    Jack Klein, Jan 4, 2008
    #6
  7. Andry <> writes:

    > What kind of flag's I should Use to compile a C++ Program?


    They vary from one compiler to another - you'll need to ask in a forum,
    group, list, or some other resource that's dedicated to the compiler you
    happen to be using.

    sherm--

    --
    My blog: http://shermspace.blogspot.com
    Cocoa programming in Perl: http://camelbones.sourceforge.net
    Sherman Pendley, Jan 4, 2008
    #7
  8. Andry

    Noah Roberts Guest

    Andry wrote:
    > What kind of flag's I should Use to compile a C++ Program?


    I'd try the Australian, Chinese, and Norwegian.
    Noah Roberts, Jan 4, 2008
    #8
  9. Andry

    James Kanze Guest

    On Jan 4, 10:15 pm, Sherman Pendley <> wrote:
    > Andry <> writes:
    > > What kind of flag's I should Use to compile a C++ Program?


    (By flags, I'm assuming that he means options.)

    > They vary from one compiler to another - you'll need to ask in
    > a forum, group, list, or some other resource that's dedicated
    > to the compiler you happen to be using.


    More likely, he'll have to read the documentation. The options
    you want will depend heavily on context: what you're doing, and
    how you're organized.

    For a beginner, it's a bit of a hassle, since of course, you
    don't know how you want to organize until you've actually
    learned some programming. (For one thing, without some
    understanding of C++ and the programming process, you probably
    won't be able to understand the documentation.) Regretfully,
    I've yet to see a compiler where the default options are useful
    for anything, so your suggestion of asking in a dedicated forum
    is probably the best he can do. Followed by choosing one of the
    conflicting answers randomly, and hoping for the best.

    If he's learning in an educational institution, of course, his
    teacher should tell him which options to use. And if it's part
    of on the job training, the company should have some established
    standards for them.

    --
    James Kanze (GABI Software) email:
    Conseils en informatique orientée objet/
    Beratung in objektorientierter Datenverarbeitung
    9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34
    James Kanze, Jan 5, 2008
    #9
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Valentin Tihomirov

    flags vs. comparator

    Valentin Tihomirov, Nov 10, 2003, in forum: VHDL
    Replies:
    5
    Views:
    631
    Valentin Tihomirov
    Nov 11, 2003
  2. Gunit
    Replies:
    2
    Views:
    553
    Just an Illusion
    Jun 28, 2004
  3. DG
    Replies:
    0
    Views:
    449
  4. Jan Nielsen

    AD user flags

    Jan Nielsen, Apr 5, 2004, in forum: ASP .Net
    Replies:
    6
    Views:
    3,829
    Jeffrey Tan[MSFT]
    Apr 13, 2004
  5. Steve Holden
    Replies:
    0
    Views:
    774
    Steve Holden
    Feb 8, 2009
Loading...

Share This Page