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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. reading a string from a file with CFile Read()

reading a string from a file with CFile Read()

Scheduled Pinned Locked Moved C / C++ / MFC
graphicsdata-structures
3 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.
  • N Offline
    N Offline
    nss
    wrote on last edited by
    #1

    I have a file with several lines of text (all end with a carriage return). I want to use my CFile object to read these strings into an array of pointers to char. I dont see a anything like GetLine()....if I dont know the length of the text on the line, I dont have a value to give Read() as a count of chracters... Actually I'm push_backing the strings onto a vector...

    C 1 Reply Last reply
    0
    • N nss

      I have a file with several lines of text (all end with a carriage return). I want to use my CFile object to read these strings into an array of pointers to char. I dont see a anything like GetLine()....if I dont know the length of the text on the line, I dont have a value to give Read() as a count of chracters... Actually I'm push_backing the strings onto a vector...

      C Offline
      C Offline
      Chris Losinger
      wrote on last edited by
      #2

      try CStdioFile -c


      WWT2D?

      Fractals

      N 1 Reply Last reply
      0
      • C Chris Losinger

        try CStdioFile -c


        WWT2D?

        Fractals

        N Offline
        N Offline
        nss
        wrote on last edited by
        #3

        That is working out......many thanks.

        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