language features!

Discussion in 'C++' started by Sean, Mar 24, 2006.

  1. Sean

    Sean Guest

    Hi, guys:
    I am newbie to the C++ from the C. I want to know something about the
    C++ language features! Could you describe your two favorite features in
    the C++ language and why you like them so much. Also describe the two
    features of the C++ language that you think are the most over-rated or
    the most misused, and why you think that is the case.
    Thanks in advance!

    Sean
     
    Sean, Mar 24, 2006
    #1
    1. Advertising

  2. Sean

    Rolf Magnus Guest

    Sean wrote:

    > Hi, guys:
    > I am newbie to the C++ from the C. I want to know something about the
    > C++ language features! Could you describe your two favorite features in
    > the C++ language and why you like them so much. Also describe the two
    > features of the C++ language that you think are the most over-rated or
    > the most misused, and why you think that is the case.


    Hmmm, this question sounds quite familiar....
    .... googling...

    Hah, I knew it:
    http://groups.google.com/group/comp.lang.c /browse_thread/thread/8106cb29a63feb75/c4705744d465c4ec

    I'm wondering if this is some kind of homework question that will come up
    here once every semester or so.
     
    Rolf Magnus, Mar 24, 2006
    #2
    1. Advertising

  3. Sean wrote:
    > Hi, guys:
    > I am newbie to the C++ from the C. I want to know something about the
    > C++ language features! Could you describe your two favorite features in
    > the C++ language and why you like them so much. Also describe the two
    > features of the C++ language that you think are the most over-rated or
    > the most misused, and why you think that is the case.
    > Thanks in advance!
    >
    > Sean
    >

    The STL library is by far the most useful C++ feature. This often
    makes use of operator overloading and functors, and by definition is a
    template library. So my vote goes to those features for the most useful.
    The most frequently misused operations are new and delete resulting
    in failed garbage collection, hence I recommend using the STL containers
    instead. Finally, the parsing of class objects by value is common source
    of problems due to constructor/destructor implementation.

    JB
     
    n2xssvv g02gfr12930, Mar 24, 2006
    #3
  4. Sean

    benben Guest

    Sean wrote:
    > Hi, guys:
    > I am newbie to the C++ from the C. I want to know something about the
    > C++ language features! Could you describe your two favorite features in
    > the C++ language and why you like them so much. Also describe the two
    > features of the C++ language that you think are the most over-rated or
    > the most misused, and why you think that is the case.
    > Thanks in advance!
    >
    > Sean
    >


    There are so many of C++ features it is just unfair to mention only
    two...but if you must then:

    * function and operator overloading
    * // comment :)

    So you can write something as cool as:

    Vector rotate(Vector v, Vector center, double theta)
    {
    Vector r = v - center; // operator overloading
    Vector p = polar_form(r);
    r = rectangular_form(p + J(theta));

    return center + relative;
    }

    Regards,
    Ben
     
    benben, Mar 24, 2006
    #4
  5. Sean

    TB Guest

    Sean skrev:
    > Hi, guys:
    > I am newbie to the C++ from the C. I want to know something about the
    > C++ language features! Could you describe your two favorite features in
    > the C++ language and why you like them so much. Also describe the two
    > features of the C++ language that you think are the most over-rated or
    > the most misused, and why you think that is the case.
    > Thanks in advance!
    >
    > Sean
    >


    I find this question kinda ugly. My two favorite features?

    --
    TB @ SWEDEN
     
    TB, Mar 24, 2006
    #5
  6. Sean

    Sgt. York Guest

    n2xssvv g02gfr12930 wrote:
    > Sean wrote:
    >> Hi, guys:
    >> I am newbie to the C++ from the C. I want to know something about the
    >> C++ language features! Could you describe your two favorite features in
    >> the C++ language and why you like them so much. Also describe the two
    >> features of the C++ language that you think are the most over-rated or
    >> the most misused, and why you think that is the case.
    >> Thanks in advance!
    >>
    >> Sean
    >>

    > The STL library is by far the most useful C++ feature. This often
    > makes use of operator overloading and functors, and by definition is a
    > template library. So my vote goes to those features for the most useful.
    > The most frequently misused operations are new and delete resulting
    > in failed garbage collection, hence I recommend using the STL containers
    > instead. Finally, the parsing of class objects by value is common source
    > of problems due to constructor/destructor implementation.
    >
    > JB


    Amen, JB. Without STL, I can't imagine myself using C++ at all. I've
    also become rather boost-dependent (www.boost.org) as well. Some really
    amazing stuff in there.

    -York
     
    Sgt. York, Mar 24, 2006
    #6
  7. Sean

    forkazoo Guest

    Sean wrote:
    > Hi, guys:
    > I am newbie to the C++ from the C. I want to know something about the
    > C++ language features! Could you describe your two favorite features in
    > the C++ language and why you like them so much. Also describe the two
    > features of the C++ language that you think are the most over-rated or
    > the most misused, and why you think that is the case.
    > Thanks in advance!
    >
    > Sean


    This is school related, right? Well, if you want to really impress
    your teacher, just tell him that the Library for Standard Data is what
    you use all the time. It will be replacing the STL. So, in class one
    day, just tell your teacher that you use the LSD all the time, and see
    how impressed he is.
     
    forkazoo, Mar 24, 2006
    #7
    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. Omnicore Software
    Replies:
    1
    Views:
    446
    Tim Tyler
    Sep 29, 2003
  2. Language features

    , Nov 2, 2005, in forum: C++
    Replies:
    18
    Views:
    587
  3. Jonathan Mcdougall
    Replies:
    2
    Views:
    516
    Kaz Kylheku
    Nov 3, 2005
  4. BillJosephson
    Replies:
    148
    Views:
    2,698
    peter koch
    Jan 27, 2007
  5. Joe

    New language features?

    Joe, Nov 29, 2007, in forum: C Programming
    Replies:
    3
    Views:
    278
    cr88192
    Nov 30, 2007
Loading...

Share This Page