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. General Programming
  3. C / C++ / MFC
  4. some problem regarding inheritance of and debugger

some problem regarding inheritance of and debugger

Scheduled Pinned Locked Moved C / C++ / MFC
debuggingcsharpvisual-studiohelpquestion
3 Posts 3 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.
  • Y Offline
    Y Offline
    ytod
    wrote on last edited by
    #1

    I found some runtime error in my solution with the IDE: Visual Studio .Net 2003. 1st problem: I inherited the STL class complex<_Ty>, and add some members to the class. However,I found the operator overloading didn't work well. I follow the way did in the overloading function: return complex(x,y); but the left side of the = lost many members. and the builder would inevitably warn: warning C4172: returning address of local variable or temporary 'Complex.h(382) : while compiling class-template member function 'Complex<_Ty>::_Myt &Complex<_Ty>::operator *(const Complex<_Ty>::_Myt &)' with [ _Ty=double ] Is there any suggestion? thanks! 2nd problem: While debugging the code, I found SOME of the member functions cannot be broke! but others CAN! and some breakpoints would jump to the other functions while debugging. These break points would be marked with INFAMOUS white question marks which said: The breakpoint would not currently be hit. Invalid file line:353 I'd checked the configuration, it's set on debug mode. Searching on the web but found no proper way. Is there any suggestion? Thanks!

    N H 2 Replies Last reply
    0
    • Y ytod

      I found some runtime error in my solution with the IDE: Visual Studio .Net 2003. 1st problem: I inherited the STL class complex<_Ty>, and add some members to the class. However,I found the operator overloading didn't work well. I follow the way did in the overloading function: return complex(x,y); but the left side of the = lost many members. and the builder would inevitably warn: warning C4172: returning address of local variable or temporary 'Complex.h(382) : while compiling class-template member function 'Complex<_Ty>::_Myt &Complex<_Ty>::operator *(const Complex<_Ty>::_Myt &)' with [ _Ty=double ] Is there any suggestion? thanks! 2nd problem: While debugging the code, I found SOME of the member functions cannot be broke! but others CAN! and some breakpoints would jump to the other functions while debugging. These break points would be marked with INFAMOUS white question marks which said: The breakpoint would not currently be hit. Invalid file line:353 I'd checked the configuration, it's set on debug mode. Searching on the web but found no proper way. Is there any suggestion? Thanks!

      N Offline
      N Offline
      Naveen
      wrote on last edited by
      #2

      ytod wrote:

      warning C4172: returning address of local variable or temporary

      you might have declared the operator overloaded funtion to return either the address od reference. Remove the reference or pointer in the return type of the function. If you paste the function here I will try to make it correct.

      ytod wrote:

      While debugging the code, I found SOME of the member functions cannot be broke! but others CAN!

      the breakpoint cannot be put in some place where.. 1. you have put a preprocessor switch so that, that part of code dosent get compiled and exists in the exe build 2. In an inline function 3. If control never reaches that point.

      nave

      1 Reply Last reply
      0
      • Y ytod

        I found some runtime error in my solution with the IDE: Visual Studio .Net 2003. 1st problem: I inherited the STL class complex<_Ty>, and add some members to the class. However,I found the operator overloading didn't work well. I follow the way did in the overloading function: return complex(x,y); but the left side of the = lost many members. and the builder would inevitably warn: warning C4172: returning address of local variable or temporary 'Complex.h(382) : while compiling class-template member function 'Complex<_Ty>::_Myt &Complex<_Ty>::operator *(const Complex<_Ty>::_Myt &)' with [ _Ty=double ] Is there any suggestion? thanks! 2nd problem: While debugging the code, I found SOME of the member functions cannot be broke! but others CAN! and some breakpoints would jump to the other functions while debugging. These break points would be marked with INFAMOUS white question marks which said: The breakpoint would not currently be hit. Invalid file line:353 I'd checked the configuration, it's set on debug mode. Searching on the web but found no proper way. Is there any suggestion? Thanks!

        H Offline
        H Offline
        Hamid Taebi
        wrote on last edited by
        #3

        See here[^] if helpfuls


        WhiteSky


        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