Re: RTTI

Discussion in 'C++' started by Alf P. Steinbach, Jul 14, 2003.

  1. On Mon, 14 Jul 2003 06:54:13 GMT, "alg" <> wrote:

    >Alf P. Steinbach <> wrote in message
    >news:...
    >> On Mon, 14 Jul 2003 06:11:05 GMT, "alg" <> wrote:
    >>
    >> >What're major content of RTTI? Does it just include static_cast<>,
    >> >dynamic_cast<>, reinterpret_cast<> and const_cast<>? Is there other
    >> >important things with it?

    >>
    >> Lots. But that sounds like homework to me.
    >>

    >
    >I sincerely wanted to learn...even it IS a homework. Now we all know you
    >know lots...


    I'm a great fan of learning-by-doing, and also of not giving explanations
    that can be quoted as homework answers (that's not meant as an insult,
    it's a general policy which may not be justified for you or any specific
    person), so here's my advice:


    Develop a program that creates a few objects of classes Duck and Dog,
    of a common base class Animal. Put these objects in a common list.
    Now let the program count the number of ducks and dogs in the list.


    If you find that this is too complex, even with a few days or a week of
    effort, then RTTI is simply beyond your current level.

    In that case, put the exercise on the to-do list; it's a great exercise.
    Alf P. Steinbach, Jul 14, 2003
    #1
    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. John Harrison

    Re: RTTI

    John Harrison, Jul 14, 2003, in forum: C++
    Replies:
    2
    Views:
    450
    John Harrison
    Jul 14, 2003
  2. Steven Lien

    About RTTI

    Steven Lien, Aug 19, 2003, in forum: C++
    Replies:
    4
    Views:
    596
    Ivan Vecerina
    Aug 19, 2003
  3. BillyO
    Replies:
    2
    Views:
    489
    dslater
    Sep 30, 2003
  4. tirath
    Replies:
    3
    Views:
    706
    Ivan Vecerina
    Oct 12, 2003
  5. MoCha

    using rtti

    MoCha, Nov 26, 2003, in forum: C++
    Replies:
    1
    Views:
    379
    Ivan Vecerina
    Nov 26, 2003
Loading...

Share This Page