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. Problem with CString

Problem with CString

Scheduled Pinned Locked Moved C / C++ / MFC
helpc++debuggingquestion
4 Posts 4 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.
  • R Offline
    R Offline
    rajeevktripathi
    wrote on last edited by
    #1

    Hi All I am making a dialog based application using MFC. I have written a function which is as follows: Function(CString strPath) { CString strTempPath; strTempath = strPath; } Now when i debug this function then as soon as control passes line "strTempath = strPath;" It causes UNHANDELED EXCEPTION ERROR. Why it is happening? Please reply. Thanks

    T 2 M 3 Replies Last reply
    0
    • R rajeevktripathi

      Hi All I am making a dialog based application using MFC. I have written a function which is as follows: Function(CString strPath) { CString strTempPath; strTempath = strPath; } Now when i debug this function then as soon as control passes line "strTempath = strPath;" It causes UNHANDELED EXCEPTION ERROR. Why it is happening? Please reply. Thanks

      T Offline
      T Offline
      ThatsAlok
      wrote on last edited by
      #2

      rajeevktripathi wrote: Function(CString strPath) { CString strTempPath; strTempath = strPath; } Could you show me your actual coding and what actual value coming in strPath.. OT: try to follow nominal Variable naming convention while coding

      "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

      cheers, Alok Gupta VC Forum Q&A :- I/ IV

      1 Reply Last reply
      0
      • R rajeevktripathi

        Hi All I am making a dialog based application using MFC. I have written a function which is as follows: Function(CString strPath) { CString strTempPath; strTempath = strPath; } Now when i debug this function then as soon as control passes line "strTempath = strPath;" It causes UNHANDELED EXCEPTION ERROR. Why it is happening? Please reply. Thanks

        2 Offline
        2 Offline
        224917
        wrote on last edited by
        #3

        Can you tell wots the exact error message. I feel your memory was already corrupted some time before it reached the Function(), but unfortunately its showing only from Function().


        suhredayan
        There is no spoon.

        1 Reply Last reply
        0
        • R rajeevktripathi

          Hi All I am making a dialog based application using MFC. I have written a function which is as follows: Function(CString strPath) { CString strTempPath; strTempath = strPath; } Now when i debug this function then as soon as control passes line "strTempath = strPath;" It causes UNHANDELED EXCEPTION ERROR. Why it is happening? Please reply. Thanks

          M Offline
          M Offline
          MailtoGops
          wrote on last edited by
          #4

          You better rebuild the application again.. It might help.. :) " Action without vision is only passing time, Vision without action is merely day dreaming, But vision with action can change the world " - Words from Nelson Mandela Thanks & Regards, Gopalakrishnan

          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