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. txt files

txt files

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

    I have two questions. First is, how can I read and write a text file? I've done this before with fstream, but that method doesn't seem to work at all with MFC. Second, is there a way I can easily intergrate these text files into the executable? If not, then they could just be kept in the same folder, but it would clean it up a lot if they were apart of it. If you have a problem with my spelling, just remember that's not my fault. I (as well as everyone else who learned to spell after 1976) blame it on Robert A. Kolpek for U.S. Patent 4,136,395.

    C 1 Reply Last reply
    0
    • S Selevercin

      I have two questions. First is, how can I read and write a text file? I've done this before with fstream, but that method doesn't seem to work at all with MFC. Second, is there a way I can easily intergrate these text files into the executable? If not, then they could just be kept in the same folder, but it would clean it up a lot if they were apart of it. If you have a problem with my spelling, just remember that's not my fault. I (as well as everyone else who learned to spell after 1976) blame it on Robert A. Kolpek for U.S. Patent 4,136,395.

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      fstream should work, but it's C. You should use iostreams to read and write text files. Plenty of tutorials on CP. You should be able to integrate text using resources, depending on how big they are. I've not done it tho. Christian I have drunk the cool-aid and found it wan and bitter. - Chris Maunder

      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