Which members are created automatically, which members are not inherited?

Discussion in 'C Programming' started by lovecreatesbeauty, Jan 26, 2006.

  1. Perhaps all C++ programmers are busy in designing their classes or get
    into a deep sleep after a through night hard work. So I am willing to
    ask the "off-topic" (perhaps not) question in this group. I think you
    understand both C and C++ entirely, if not, why you still work on the C
    programming language. And you are experts on both them, so it is not
    off-topic at all. I need your help.

    Please let us go into the topic.

    I'm disturbed on this question for a long time. I think if I finally
    get understand it with your kind help, I will get close to a excellent
    C++ programmer. And I only can rely on your expertise and help. I've
    read some books, but no book focuses on this. Don't you think it is a
    very important thing of C++ programming language? So your knowledge is
    of great benefit to others, especially me.


    1. Which (How many) members will be created automatically?

    Scott Meyers seems to give this list in a early print of his
    <<effective C++, 2nd>>, but he removed 1 (or 2, perhaps you know it),
    the list containing 6 members he gives is:

    default constructor, copy constructor, destructor, assignment
    operator, a pair of address-of operators (i.e. const, non-const) .

    But in a later print (not a new edition, I don't read the 3rd one) he
    removed the last pair of operators from that list without a detail
    description, or he put that pair in that list before without a
    thoroughly convinced reason. That is my complaint.

    Dr. Bjarne Stroustrup mentioned operator , (i.e. comma) is also a
    predefined member (he mentioned total 3: =, &, and , in TC++PL sec
    11.2.2), but Andrew Koenig said "That is not a member function." in my
    post before. Obviously, it is inside a class body, so I do not
    understand what he said.

    Herb Sutter mentioned &&, || and , (comma) in his new book C++ coding
    standard. But he did not give a complete list of automatically created
    class members also. He always talks about some magic things on usage of
    vector, list or some similar things with gurus. That is my complaint.

    How about new and delete, and some others functions or operators which
    I do not know the name. Who will give a complete list?


    2. Which (How many) members can not be inherited?

    I know default ctor, copy ctor, dctor, assignment operator can not be
    inherited. The first three members share the same name respectively
    even the base class name and the derived class name are different - it
    is obvious, but it helps me to understand the reason of non-inherited.
    I can understand operator assignment will not be inherited also.

    But I am not sure if there are other members also can not be inherited.

    How about new and delete, and some others functions or operators which
    I do not know the name. Who will give a complete list?


    Sincerely,

    lovecreatesbeauty
    lovecreatesbeauty, Jan 26, 2006
    #1
    1. Advertising

  2. lovecreatesbeauty

    Ico Guest

    lovecreatesbeauty <> wrote:

    > Perhaps all C++ programmers ...


    [...snipped a lot of stuff about classes, members, constructors ...]

    > ... complete list?


    I did not understand anything at all from your story, but that is
    probably because it was all about the wrong language. I assume you ment
    to send it to comp.lang.c++, but posted in the wrong group accidentally ?

    --
    :wq
    ^X^Cy^K^X^C^C^C^C
    Ico, Jan 26, 2006
    #2
    1. Advertising

  3. Ico wrote:

    > lovecreatesbeauty <> wrote:
    >
    >> Perhaps all C++ programmers ...

    >
    > [...snipped a lot of stuff about classes, members, constructors ...]
    >
    >> ... complete list?

    >
    > I did not understand anything at all from your story, but that is
    > probably because it was all about the wrong language. I assume you
    > ment to send it to comp.lang.c++, but posted in the wrong group
    > accidentally ?
    >


    Please don't feed the troll. I found this bit (which you rightly
    snipped) mildly insulting (to both c.l.c and c.l.c++, BTW):

    > lovecreatesbeauty <> wrote:
    >> Perhaps all C++ programmers are busy in designing their classes or
    >> get into a deep sleep after a through night hard work. So I am
    >> willing to ask the "off-topic" (perhaps not) question in this group.
    >> I think you understand both C and C++ entirely, if not, why you still
    >> work on the C programming language. And you are experts on both them,
    >> so it is not off-topic at all. I need your help.
    >>
    >> Please let us go into the topic.


    BTW, someone in c.l.c had a nice ASCII art "do not feed the trolls" sig
    a while ago. Can you post it again, please?

    Cheers

    Vladimir

    --
    Sanity is the trademark of a weak mind.
    -- Mark Harrold
    Vladimir S. Oka, Jan 26, 2006
    #3
  4. Vladimir S. Oka wrote:
    > Please don't feed the troll. I found this bit (which you rightly
    > snipped) mildly insulting (to both c.l.c and c.l.c++, BTW):
    >


    No. I'm not. You're wrong.
    I just want more help on my questions.
    lovecreatesbeauty, Jan 26, 2006
    #4
  5. lovecreatesbeauty wrote:

    >
    > Vladimir S. Oka wrote:
    >> Please don't feed the troll. I found this bit (which you rightly
    >> snipped) mildly insulting (to both c.l.c and c.l.c++, BTW):
    >>

    >
    > No. I'm not. You're wrong.
    > I just want more help on my questions.


    > lovecreatesbeauty <> wrote:
    >> I think you understand both C and C++ entirely, if not, why you still
    >> work on the C programming language. And you are experts on both them,
    >> so it is not off-topic at all.


    An how exactly is deriding the language of choice in c.l.c going to
    enamour you to the fine people here?

    Don't bother to answer...

    Bye

    Vladimir


    --
    All the world's a stage and most of us are desperately unrehearsed.
    -- Sean O'Casey
    Vladimir S. Oka, Jan 26, 2006
    #5
  6. lovecreatesbeauty

    Grumble Guest

    Re: Which members are created automatically, which members are notinherited?

    Vladimir S. Oka wrote:
    > BTW, someone in c.l.c had a nice ASCII art "do not feed the trolls"
    > sig a while ago. Can you post it again, please?



    _____________________
    /| /| | |
    ||__|| | Please do not |
    / O O\__ | feed the |
    / \ | Trolls |
    / \ \|_____________________|
    / _ \ \ ||
    / |\____\ \ ||
    / | | | |\____/ ||
    / \|_|_|/ | _||
    / / \ |____| ||
    / | | | --|
    | | | |____ --|
    * _ | |_|_|_| | \-/
    *-- _--\ _ \ | ||
    / _ \\ | / `
    * / \_ /- | | |
    * ___ c_c_c_C/ \C_c_c_c____________



    +-------------------+ .:\:\:/:/:.
    | PLEASE DO NOT | :.:\:\:/:/:.:
    | FEED THE TROLLS | :=.' - - '.=:
    | | '=(\ 9 9 /)='
    | Thank you, | ( (_) )
    | Management | /`-vvv-'\
    +-------------------+ / \
    | | @@@ / /|,,,,,|\ \
    | | @@@ /_// /^\ \\_\
    @x@@x@ | | |/ WW( ( ) )WW
    \||||/ | | \| __\,,\ /,,/__
    \||/ | | | jgs (______Y______)
    /\/\/\/\/\/\/\/\//\/\\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
    ==============================================================
    Grumble, Jan 26, 2006
    #6
  7. Grumble wrote:

    > Vladimir S. Oka wrote:
    >> BTW, someone in c.l.c had a nice ASCII art "do not feed the trolls"
    >> sig a while ago. Can you post it again, please?

    >
    >
    > _____________________
    > /| /| | |
    > ||__|| | Please do not |
    > / O O\__ | feed the |
    > / \ | Trolls |
    > / \ \|_____________________|
    > / _ \ \ ||
    > / |\____\ \ ||
    > / | | | |\____/ ||
    > / \|_|_|/ | _||
    > / / \ |____| ||
    > / | | | --|
    > | | | |____ --|
    > * _ | |_|_|_| | \-/
    > *-- _--\ _ \ | ||
    > / _ \\ | / `
    > * / \_ /- | | |
    > * ___ c_c_c_C/ \C_c_c_c____________
    >
    >
    >
    > +-------------------+ .:\:\:/:/:.
    > | PLEASE DO NOT | :.:\:\:/:/:.:
    > | FEED THE TROLLS | :=.' - - '.=:
    > | | '=(\ 9 9 /)='
    > | Thank you, | ( (_) )
    > | Management | /`-vvv-'\
    > +-------------------+ / \
    > | | @@@ / /|,,,,,|\ \
    > | | @@@ /_// /^\ \\_\
    > @x@@x@ | | |/ WW( ( ) )WW
    > \||||/ | | \| __\,,\ /,,/__
    > \||/ | | | jgs (______Y______)
    > /\/\/\/\/\/\/\/\//\/\\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
    > ==============================================================


    Thanks! I'll keep them safe (and hungry).

    Vladimir

    --
    186,282 miles per second:

    It isn't just a good idea, it's the law!
    Vladimir S. Oka, Jan 26, 2006
    #7
  8. Re: Which members are created automatically, which members are notinherited?

    lovecreatesbeauty wrote:
    > I think you
    > understand both C and C++ entirely,


    That is a bad assumption. Many of our posters are neophytes looking for
    help, some of our expert regulars work in environments for which there
    are no C++ compilers, and other expert regulars don't bother with the
    byzantine features of C++

    > if not, why you still work on the C
    > programming language.


    And that kind of "question" is flame-bait which should never be posted
    to any language-specific newsgroup.

    > And you are experts on both them, so it is not
    > off-topic at all.


    That is so fallacious it is hard to imagine anyone stupid enough to
    write it. Most of us who post here regularly are experts in other
    languages or in particular domain-specific topics. That expertise does
    not make questions in those areas topical. The newsgroup is about C;
    expertise in other areas cannot change that.

    > I need your help.


    No shit.

    [Questions about C++ snipped]
    Martin Ambuhl, Jan 26, 2006
    #8
  9. On Thu, 26 Jan 2006 17:29:40 +0000 (UTC), in comp.lang.c , "Vladimir
    S. Oka" <> wrote:

    >BTW, someone in c.l.c had a nice ASCII art "do not feed the trolls" sig
    >a while ago. Can you post it again, please?


    --

    _____________________
    /| /| | |
    ||__|| | Please do not |
    / O O\__ | feed the |
    / \ | Trolls |
    / \ \|_____________________|
    / _ \ \ ||
    / |\____\ \ ||
    / | | | |\____/ ||
    / \|_|_|/ | _||
    / / \ |____| ||
    / | | | --|
    | | | |____ --|
    * _ | |_|_|_| | \-/
    *-- _--\ _ \ | ||
    / _ \\ | / `
    * / \_ /- | | |
    * ___ c_c_c_C/ \C_c_c_c____________

    ----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----
    http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
    ----= East and West-Coast Server Farms - Total Privacy via Encryption =----
    Mark McIntyre, Jan 26, 2006
    #9
  10. lovecreatesbeauty

    Default User Guest

    lovecreatesbeauty wrote:

    > Perhaps all C++ programmers are busy in designing their classes or get
    > into a deep sleep after a through night hard work. So I am willing to
    > ask the "off-topic" (perhaps not) question in this group. I think you
    > understand both C and C++ entirely, if not, why you still work on the
    > C programming language. And you are experts on both them, so it is not
    > off-topic at all. I need your help.


    Fancy logic, but wrong. You won't get answers here, and you DID get
    answers on comp.lang.c++, rather detailed ones.




    Brian
    Default User, Jan 26, 2006
    #10
  11. lovecreatesbeauty

    Default User Guest

    lovecreatesbeauty wrote:


    > No. I'm not. You're wrong.
    > I just want more help on my questions.


    *plonk*



    Brian
    Default User, Jan 26, 2006
    #11
  12. lovecreatesbeauty

    CBFalconer Guest

    Re: Which members are created automatically, which members are notinherited?

    "Vladimir S. Oka" wrote:
    >

    .... snip ...
    >
    > BTW, someone in c.l.c had a nice ASCII art "do not feed the
    > trolls" sig a while ago. Can you post it again, please?


    Here's a couple of them. Enjoy.

    _____________________
    /| /| | F
    ||__|| | Please do not |
    / O O\__ | feed the |
    / \ | Trolls |
    / \ \|_____________________|
    / _ \ \ ||
    / |\____\ \ ||
    / | | | |\____/ ||
    / \|_|_|/ | _||
    / / \ |____| ||
    / | | | --|
    | | | |____ --|
    * _ | |_|_|_| | \-/
    -- _--\ _ \ | ||
    / _ \\ | / `
    / \_ /- | | |
    * ___ c_c_c_C/ \C_c_c_c____________

    +-------------------+ .:\:\:/:/:.
    | PLEASE DO NOT F :.:\:\:/:/:.:
    | FEED THE TROLLS | :=.' - - '.=:
    | | '=(\ 9 9 /)='
    | Thank you, | ( (_) )
    | Management | /`-vvv-'\
    +-------------------+ / \
    | | @@@ / /|,,,,,|\ \
    | | @@@ /_// /^\ \\_\
    @x@@x@ | | |/ WW( ( ) )WW
    \||||/ | | \| __\,,\ /,,/__
    \||/ | | | jgs (______Y______)
    /\/\/\/\/\/\/\/\//\/\\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
    ==============================================================

    --
    "If you want to post a followup via groups.google.com, don't use
    the broken "Reply" link at the bottom of the article. Click on
    "show options" at the top of the article, then click on the
    "Reply" at the bottom of the article headers." - Keith Thompson
    More details at: <http://cfaj.freeshell.org/google/>
    CBFalconer, Jan 27, 2006
    #12
  13. In article <>,
    lovecreatesbeauty <> wrote:
    >
    >Vladimir S. Oka wrote:
    >> Please don't feed the troll. I found this bit (which you rightly
    >> snipped) mildly insulting (to both c.l.c and c.l.c++, BTW):
    >>

    >
    >No. I'm not. You're wrong.
    >I just want more help on my questions.


    I think I'm going to have to agree with you here.

    You're not smart enough to be a troll. You're just an idiot.

    - Trolls R Us -
    - Trolls Local 202 -
    Kenny McCormack, Feb 4, 2006
    #13
  14. Kenny McCormack wrote:
    > - Trolls R Us -
    > - Trolls Local 202 -


    I always thought that no self-respecting troll would ever admit to being
    one!

    ;-) ;-)

    Cheers

    Vladimir

    --
    The scum also rises.
    -- Dr. Hunter S. Thompson
    Vladimir S. Oka, Feb 4, 2006
    #14
  15. In article <ds31k4$reg$-infra.bt.com>,
    Vladimir S. Oka <> wrote:
    >Kenny McCormack wrote:
    >> - Trolls R Us -
    >> - Trolls Local 202 -

    >
    >I always thought that no self-respecting troll would ever admit to being
    >one!
    >
    >;-) ;-)


    In *this* NG, the trolls are the leading lights.
    And that's no joke.
    Kenny McCormack, Feb 4, 2006
    #15
  16. Re: Which members are created automatically, which members are notinherited?

    "Vladimir S. Oka" <> writes:
    > Kenny McCormack wrote:

    [snip]
    >
    > I always thought that no self-respecting troll would ever admit to being
    > one!


    KM has long admitted to being a troll. Please either killfile him or
    ignore him. I thought I hadn't seen very many posts from him lately;
    perhaps ignoring him was actually working. Let's try it again.

    --
    Keith Thompson (The_Other_Keith) <http://www.ghoti.net/~kst>
    San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
    We must do something. This is something. Therefore, we must do this.
    Keith Thompson, Feb 4, 2006
    #16
  17. Keith Thompson wrote:

    > "Vladimir S. Oka" <> writes:
    >> Kenny McCormack wrote:

    > [snip]
    >>
    >> I always thought that no self-respecting troll would ever admit to
    >> being one!

    >
    > KM has long admitted to being a troll. Please either killfile him or
    > ignore him. I thought I hadn't seen very many posts from him lately;
    > perhaps ignoring him was actually working. Let's try it again.
    >


    You're right. I just couldn't resist the "Trolls R Us" bit. :-(

    Cheers

    Vladimir

    --
    If entropy is increasing, where is it coming from?
    Vladimir S. Oka, Feb 4, 2006
    #17
  18. Re: Which members are created automatically, which members are notinherited?

    In article <>,
    Keith Thompson <> wrote:
    >"Vladimir S. Oka" <> writes:
    >> Kenny McCormack wrote:

    >[snip]
    >>
    >> I always thought that no self-respecting troll would ever admit to being
    >> one!

    >
    >KM has long admitted to being a troll. Please either killfile him or
    >ignore him. I thought I hadn't seen very many posts from him lately;
    >perhaps ignoring him was actually working. Let's try it again.


    You seem to have a real problem with me, don't you?

    And I notice that *you* can't seem to stop responding to my posts/threads...
    Kenny McCormack, Feb 4, 2006
    #18
  19. Re: Which members are created automatically, which members are notinherited?

    "Vladimir S. Oka" <> writes:
    > Keith Thompson wrote:

    [...]
    >> KM has long admitted to being a troll. Please either killfile him or
    >> ignore him. I thought I hadn't seen very many posts from him lately;
    >> perhaps ignoring him was actually working. Let's try it again.
    >>

    >
    > You're right. I just couldn't resist the "Trolls R Us" bit. :-(


    Please try harder. :-|

    --
    Keith Thompson (The_Other_Keith) <http://www.ghoti.net/~kst>
    San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
    We must do something. This is something. Therefore, we must do this.
    Keith Thompson, Feb 4, 2006
    #19
  20. "Keith Thompson" <> wrote in message
    news:...
    > "Vladimir S. Oka" <> writes:
    > > Keith Thompson wrote:

    > [...]
    > >> KM has long admitted to being a troll. Please either killfile him or
    > >> ignore him. I thought I hadn't seen very many posts from him lately;
    > >> perhaps ignoring him was actually working. Let's try it again.
    > >>

    > >
    > > You're right. I just couldn't resist the "Trolls R Us" bit. :-(

    >
    > Please try harder. :-|
    >


    What's your definition of a troll? I went and looked it up to see if it had
    changed in fifteen years and it hadn't. It's a regular, who contributes
    nothing, never learns to stop replying, and never leaves.

    Look at your last seven posts: 6 complaints, 1 useful.

    Now I'm being forced to become at troll. Perhaps you became a troll over
    time and just didn't realize it. Take a look in the mirror.


    Rod Pemberton
    Rod Pemberton, Feb 5, 2006
    #20
    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. Replies:
    4
    Views:
    364
    Siemel Naran
    May 20, 2004
  2. Simon White
    Replies:
    2
    Views:
    353
    Sharad Kala
    Jun 16, 2004
  3. lovecreatesbeauty
    Replies:
    2
    Views:
    576
  4. Cirene
    Replies:
    1
    Views:
    299
    Cirene
    Sep 16, 2008
  5. 7stud --
    Replies:
    11
    Views:
    386
    7stud --
    Nov 9, 2007
Loading...

Share This Page