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. Reading files without MFC

Reading files without MFC

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

    I am having a problem with the read function. I hava to read a pcx(binary) file into a struct . how can i do this?

    C M J 3 Replies Last reply
    0
    • D DiegoValdevino

      I am having a problem with the read function. I hava to read a pcx(binary) file into a struct . how can i do this?

      C Offline
      C Offline
      Carlos Antollini
      wrote on last edited by
      #2

      You can open the file with fopen, and then use fread Also you can use OpenFile and ReadFile Regards.... Carlos Antollini. Sonork ID 100.10529 cantollini

      1 Reply Last reply
      0
      • D DiegoValdevino

        I am having a problem with the read function. I hava to read a pcx(binary) file into a struct . how can i do this?

        M Offline
        M Offline
        Mustafa Demirhan
        wrote on last edited by
        #3

        You can also use C++'s ifstream to read files. For more help see MSDN. Kind regards Mustafa Demirhan http://www.macroangel.com Sonork ID 100.9935:zoltrix

        1 Reply Last reply
        0
        • D DiegoValdevino

          I am having a problem with the read function. I hava to read a pcx(binary) file into a struct . how can i do this?

          J Offline
          J Offline
          Jens Kreiensiek
          wrote on last edited by
          #4

          ...maybe the problem is your structure... Use the following pragma's around your definition:

          #pragma pack(push, 1)
          ...
          #pragma pack(pop)

          have fun... jk :cool:

          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