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. error using "sick" text file with character > 255

error using "sick" text file with character > 255

Scheduled Pinned Locked Moved C / C++ / MFC
helptutorialquestion
4 Posts 2 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.
  • J Offline
    J Offline
    Jonathan de Halleux
    wrote on last edited by
    #1

    I have to parse file that contains (some times) character > 255, this is due to some problem with the device that writes the file. Does anybody know how to handle this case with ifstream ? Jonathan de Halleux.

    M 1 Reply Last reply
    0
    • J Jonathan de Halleux

      I have to parse file that contains (some times) character > 255, this is due to some problem with the device that writes the file. Does anybody know how to handle this case with ifstream ? Jonathan de Halleux.

      M Offline
      M Offline
      Michael Dunn
      wrote on last edited by
      #2

      Not sure I understand - a char by definition can't be greater than 255. :confused: --Mike-- Ericahist | Homepage | RightClick-Encrypt | 1ClickPicGrabber Ericahist updated (again) Sep 6!

      J 2 Replies Last reply
      0
      • M Michael Dunn

        Not sure I understand - a char by definition can't be greater than 255. :confused: --Mike-- Ericahist | Homepage | RightClick-Encrypt | 1ClickPicGrabber Ericahist updated (again) Sep 6!

        J Offline
        J Offline
        Jonathan de Halleux
        wrote on last edited by
        #3

        The file is mixture of binary and text data. Normally, the device writes character < 255 but sometimes it screws up and write random bits which can be > 255: Here's the kind of text I get: 1ŠÂ‚b¢ºb’šb¢‚R5,$ ??? Jonathan de Halleux.

        1 Reply Last reply
        0
        • M Michael Dunn

          Not sure I understand - a char by definition can't be greater than 255. :confused: --Mike-- Ericahist | Homepage | RightClick-Encrypt | 1ClickPicGrabber Ericahist updated (again) Sep 6!

          J Offline
          J Offline
          Jonathan de Halleux
          wrote on last edited by
          #4

          was another bug, soory Jonathan de Halleux.

          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