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. initial a string why this new string has strange character at begin [modified]

initial a string why this new string has strange character at begin [modified]

Scheduled Pinned Locked Moved C / C++ / MFC
c++comdebugginghelptutorial
6 Posts 4 Posters 1 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.
  • J Offline
    J Offline
    jeansea
    wrote on last edited by
    #1

    i build a new MFC project using a string to initial a new string mm code is string mm = "abc"; debug mode mm will be "abc"; but in release mm will be "`v;" when in debug mode it will be ok see below photo: but when in release it will no right see below; why does that happen can help me by the way how to upload photo in codeproject thank you

    modified on Tuesday, April 28, 2009 3:29 AM

    CPalliniC P 2 Replies Last reply
    0
    • J jeansea

      i build a new MFC project using a string to initial a new string mm code is string mm = "abc"; debug mode mm will be "abc"; but in release mm will be "`v;" when in debug mode it will be ok see below photo: but when in release it will no right see below; why does that happen can help me by the way how to upload photo in codeproject thank you

      modified on Tuesday, April 28, 2009 3:29 AM

      CPalliniC Offline
      CPalliniC Offline
      CPallini
      wrote on last edited by
      #2

      Debugging Release version, built without debugging info, may lead to apparently strange results, I believe. :)

      If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
      This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
      [My articles]

      In testa che avete, signor di Ceprano?

      M 1 Reply Last reply
      0
      • CPalliniC CPallini

        Debugging Release version, built without debugging info, may lead to apparently strange results, I believe. :)

        If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
        This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
        [My articles]

        M Offline
        M Offline
        Michael Schubert
        wrote on last edited by
        #3

        You may add yourself to the list of contributers of the "CP's memorable quotes" list. :)

        modified on Tuesday, April 28, 2009 4:20 AM

        CPalliniC 1 Reply Last reply
        0
        • J jeansea

          i build a new MFC project using a string to initial a new string mm code is string mm = "abc"; debug mode mm will be "abc"; but in release mm will be "`v;" when in debug mode it will be ok see below photo: but when in release it will no right see below; why does that happen can help me by the way how to upload photo in codeproject thank you

          modified on Tuesday, April 28, 2009 3:29 AM

          P Offline
          P Offline
          Perry Holman
          wrote on last edited by
          #4

          Maybe other codes bring memory error. BTW, you can use CString here.

          Welcome to www.softwaretree.net! This website is generated completely by static html pages transforming technology. You can find many excellent audio/video tools there!

          CPalliniC 1 Reply Last reply
          0
          • M Michael Schubert

            You may add yourself to the list of contributers of the "CP's memorable quotes" list. :)

            modified on Tuesday, April 28, 2009 4:20 AM

            CPalliniC Offline
            CPalliniC Offline
            CPallini
            wrote on last edited by
            #5

            Too kind man, too kind, indeed. :)

            If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
            This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
            [My articles]

            In testa che avete, signor di Ceprano?

            1 Reply Last reply
            0
            • P Perry Holman

              Maybe other codes bring memory error. BTW, you can use CString here.

              Welcome to www.softwaretree.net! This website is generated completely by static html pages transforming technology. You can find many excellent audio/video tools there!

              CPalliniC Offline
              CPalliniC Offline
              CPallini
              wrote on last edited by
              #6

              Why CString is supposed to behave better than std::string there (everywhere)? :-D

              If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
              This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
              [My articles]

              In testa che avete, signor di Ceprano?

              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