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. HELP!!! Return between CStrings

HELP!!! Return between CStrings

Scheduled Pinned Locked Moved C / C++ / MFC
c++helpquestion
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.
  • S Offline
    S Offline
    Sunnygirl
    wrote on last edited by
    #1

    hello @all, i have a mfc-program and two CStrings. i would like to connect these, but everyone in its own line, e.g. they should be separated with a Return. CString one="123"; CString two="456"; CString combination="123 456"; i posted it yesterday and somebody said, that i can use this: combination=one+0X0A+0X0D+two; but when i save my CString combination into a txt-file, the CString are not in its own line, there is only a 'symbol' between them. what must i do, that the CStrings are in their own lines??? thanks sunny

    B T I 3 Replies Last reply
    0
    • S Sunnygirl

      hello @all, i have a mfc-program and two CStrings. i would like to connect these, but everyone in its own line, e.g. they should be separated with a Return. CString one="123"; CString two="456"; CString combination="123 456"; i posted it yesterday and somebody said, that i can use this: combination=one+0X0A+0X0D+two; but when i save my CString combination into a txt-file, the CString are not in its own line, there is only a 'symbol' between them. what must i do, that the CStrings are in their own lines??? thanks sunny

      B Offline
      B Offline
      benjymous
      wrote on last edited by
      #2

      use "\n" -- Help me! I'm turning into a grapefruit!

      1 Reply Last reply
      0
      • S Sunnygirl

        hello @all, i have a mfc-program and two CStrings. i would like to connect these, but everyone in its own line, e.g. they should be separated with a Return. CString one="123"; CString two="456"; CString combination="123 456"; i posted it yesterday and somebody said, that i can use this: combination=one+0X0A+0X0D+two; but when i save my CString combination into a txt-file, the CString are not in its own line, there is only a 'symbol' between them. what must i do, that the CStrings are in their own lines??? thanks sunny

        T Offline
        T Offline
        Thomas Lau
        wrote on last edited by
        #3

        It should be :one +0X0D+0X0A+two;:)

        1 Reply Last reply
        0
        • S Sunnygirl

          hello @all, i have a mfc-program and two CStrings. i would like to connect these, but everyone in its own line, e.g. they should be separated with a Return. CString one="123"; CString two="456"; CString combination="123 456"; i posted it yesterday and somebody said, that i can use this: combination=one+0X0A+0X0D+two; but when i save my CString combination into a txt-file, the CString are not in its own line, there is only a 'symbol' between them. what must i do, that the CStrings are in their own lines??? thanks sunny

          I Offline
          I Offline
          includeh10
          wrote on last edited by
          #4

          why not just: combine=one+"\r\n"+two; includeh10

          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