Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Other Discussions
  3. The Back Room
  4. C++ annoyance

C++ annoyance

Scheduled Pinned Locked Moved The Back Room
c++comquestion
9 Posts 5 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    Chris Losinger
    wrote on last edited by
    #1

    i have a base class with two virtual member functions with the same name (but with different signatures). now i find that i have to override both of these functions in derived classes - i can't just override one, or it complains. that's stupid. it knows about name overloading in some contexts but not others? grr. -c


    Garbage collection, making life better - for weenies!

    Image Processing - now with extra cess.

    S N 2 Replies Last reply
    0
    • C Chris Losinger

      i have a base class with two virtual member functions with the same name (but with different signatures). now i find that i have to override both of these functions in derived classes - i can't just override one, or it complains. that's stupid. it knows about name overloading in some contexts but not others? grr. -c


      Garbage collection, making life better - for weenies!

      Image Processing - now with extra cess.

      S Offline
      S Offline
      Shog9 0
      wrote on last edited by
      #2

      Chris Losinger wrote: Image Processing - now with extra cess. cess?!? That's not how Mom used to make it... :( --------

      Have you hugged your monitor today?

      --Shog9 --

      C 1 Reply Last reply
      0
      • C Chris Losinger

        i have a base class with two virtual member functions with the same name (but with different signatures). now i find that i have to override both of these functions in derived classes - i can't just override one, or it complains. that's stupid. it knows about name overloading in some contexts but not others? grr. -c


        Garbage collection, making life better - for weenies!

        Image Processing - now with extra cess.

        N Offline
        N Offline
        Navin
        wrote on last edited by
        #3

        What I find mildly annoying.. not directly related to your problem, but close... is when you are deriving a class from a base class, you always have to specify the explicit base class when calling it's functions.. that is.. void DerivedClass::SomeFunc() { BaseClass::SomeFunc(); } Why isn't there a keyword that automatically access the base class, like: void DerivedClass::SomeFunc() { baseclass::SomeFunc(); } That way if I change the underlying class structure or name of the base class,I don't have to go and replace all of those guys. Alas. C++ is great, but it ain't perfect. Even if you win the rat race, you're still a rat.

        C R 2 Replies Last reply
        0
        • S Shog9 0

          Chris Losinger wrote: Image Processing - now with extra cess. cess?!? That's not how Mom used to make it... :( --------

          Have you hugged your monitor today?

          --Shog9 --

          C Offline
          C Offline
          Chris Losinger
          wrote on last edited by
          #4

          you must've had a mean mom. Image Processing is best when made with 100% natural farm-fresh cess!* *ask for it by name -c


          Garbage collection, making life better - for weenies!

          Image Processing - now with extra cess.

          S 1 Reply Last reply
          0
          • N Navin

            What I find mildly annoying.. not directly related to your problem, but close... is when you are deriving a class from a base class, you always have to specify the explicit base class when calling it's functions.. that is.. void DerivedClass::SomeFunc() { BaseClass::SomeFunc(); } Why isn't there a keyword that automatically access the base class, like: void DerivedClass::SomeFunc() { baseclass::SomeFunc(); } That way if I change the underlying class structure or name of the base class,I don't have to go and replace all of those guys. Alas. C++ is great, but it ain't perfect. Even if you win the rat race, you're still a rat.

            C Offline
            C Offline
            Chris Losinger
            wrote on last edited by
            #5

            somewhat related to your's:

            myStruct.m_1 = ...;
            myStruct.m_2 = ...;
            myStruct.m_3 = ...;
            myStruct.m_4 = ...;
            myStruct.m_5 = ...;

            wouldn't it be nice if C++ had the equivalent of Basic/Pascal's "with" ?

            with myStruct
            {
            m_1 = ...;
            m_2 = ...;
            m_3 = ...;
            m_4 = ...;
            m_5 = ...;
            }

            -c


            Garbage collection, making life better - for weenies!

            Image Processing - now with extra cess.

            1 Reply Last reply
            0
            • N Navin

              What I find mildly annoying.. not directly related to your problem, but close... is when you are deriving a class from a base class, you always have to specify the explicit base class when calling it's functions.. that is.. void DerivedClass::SomeFunc() { BaseClass::SomeFunc(); } Why isn't there a keyword that automatically access the base class, like: void DerivedClass::SomeFunc() { baseclass::SomeFunc(); } That way if I change the underlying class structure or name of the base class,I don't have to go and replace all of those guys. Alas. C++ is great, but it ain't perfect. Even if you win the rat race, you're still a rat.

              R Offline
              R Offline
              Rama Krishna Vavilala
              wrote on last edited by
              #6

              In VC7 you can use the __super keyword.:) I have never wasted time worrying about such insignificant things. Keep your eye upon the donut and NOT upon the hole. - Bill Sergio about posting in the right forum. The Lounge - June 23, 2002

              K 1 Reply Last reply
              0
              • C Chris Losinger

                you must've had a mean mom. Image Processing is best when made with 100% natural farm-fresh cess!* *ask for it by name -c


                Garbage collection, making life better - for weenies!

                Image Processing - now with extra cess.

                S Offline
                S Offline
                Shog9 0
                wrote on last edited by
                #7

                Chris Losinger wrote: Image Processing is best when made with 100% natural farm-fresh cess! LOL! Ok, seeing as you're the Image Processing expert, i'll give you the benefit of the doubt. But it does sound suspect... --------

                Have you hugged your monitor today?

                --Shog9 --

                1 Reply Last reply
                0
                • R Rama Krishna Vavilala

                  In VC7 you can use the __super keyword.:) I have never wasted time worrying about such insignificant things. Keep your eye upon the donut and NOT upon the hole. - Bill Sergio about posting in the right forum. The Lounge - June 23, 2002

                  K Offline
                  K Offline
                  Kannan Kalyanaraman
                  wrote on last edited by
                  #8

                  Is it for mc++ or is it part of microsoft specific c++ or is it part of c++ std. ms has implemented in its compiler :confused: Kannan

                  R 1 Reply Last reply
                  0
                  • K Kannan Kalyanaraman

                    Is it for mc++ or is it part of microsoft specific c++ or is it part of c++ std. ms has implemented in its compiler :confused: Kannan

                    R Offline
                    R Offline
                    Rama Krishna Vavilala
                    wrote on last edited by
                    #9

                    Kannan Kalyanaraman wrote: is it part of microsoft specific c++ It is part of microsoft extensions to C++. ATL code makes use of that. There is another thing called __if_exists all make certain things cool while working with templates. I am not sure whether these are documented or not. I have never wasted time worrying about such insignificant things. Keep your eye upon the donut and NOT upon the hole. - Bill Sergio about posting in the right forum. The Lounge - June 23, 2002

                    1 Reply Last reply
                    0
                    Reply
                    • Reply as topic
                    Log in to reply
                    • Oldest to Newest
                    • Newest to Oldest
                    • Most Votes


                    • Login

                    • Don't have an account? Register

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • World
                    • Users
                    • Groups