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. Managed C++/CLI
  4. [] symbol appears in string when reading from / writing to file

[] symbol appears in string when reading from / writing to file

Scheduled Pinned Locked Moved Managed C++/CLI
tutorialquestion
1 Posts 1 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.
  • K Offline
    K Offline
    KlaasVersteeg
    wrote on last edited by
    #1

    Hi, I have written a piece of code to save data from a Windows form in a file, and to read it from the file back into the Windows form. This works fine on the computer on which I've written the code (Windows 7). However, now I try to run the program on another computer (Windows XP), and a strange thing happens: when I read the data from the file, a rectangle character appeard at the end of each line. When I write the data to the file, another such character is written to the file. So every time I save and read a file, an extra rectangle character is added. I'm using streamwriter / streamreader for the file input / output. Any idea how to prevent this strange behaviour?

    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