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. Problems reading from a text file

Problems reading from a text file

Scheduled Pinned Locked Moved C / C++ / MFC
data-structureshelp
2 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.
  • K Offline
    K Offline
    KaKa
    wrote on last edited by
    #1

    Hi, I have problems reading values from a text file into an array. The first problem is reading the data from the file and the other is about data type conversion. The values in a textfile are arranged vertically, like in a column: 0 1 0 1 1 0 0 1 . . and so on. There is only 1 vertical column of numbers in the textfile. I used a loop below to read the values from the file into an array: while( inClientFile >> values) //inClientFile is an ifstream object. cout<<.......<

    Z 1 Reply Last reply
    0
    • K KaKa

      Hi, I have problems reading values from a text file into an array. The first problem is reading the data from the file and the other is about data type conversion. The values in a textfile are arranged vertically, like in a column: 0 1 0 1 1 0 0 1 . . and so on. There is only 1 vertical column of numbers in the textfile. I used a loop below to read the values from the file into an array: while( inClientFile >> values) //inClientFile is an ifstream object. cout<<.......<

      Z Offline
      Z Offline
      Zac Howland
      wrote on last edited by
      #2

      See this response.

      If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week Zac

      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