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. write a generic function simillar to the "fgets" [modified]

write a generic function simillar to the "fgets" [modified]

Scheduled Pinned Locked Moved C / C++ / MFC
c++tutorial
8 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.
  • K Offline
    K Offline
    kamalesh82
    wrote on last edited by
    #1

    I want to read a line from a file which consist number of lines.In mfc library there is no function for "fgets"( am opening this file "CFile::Open(.....) function,with sharedeny access flagcheck).If any one can give me the hint to how to write this generic functiopnality using mfc, i'll be gratefull.

    kamalesh

    M C D 3 Replies Last reply
    0
    • K kamalesh82

      I want to read a line from a file which consist number of lines.In mfc library there is no function for "fgets"( am opening this file "CFile::Open(.....) function,with sharedeny access flagcheck).If any one can give me the hint to how to write this generic functiopnality using mfc, i'll be gratefull.

      kamalesh

      M Offline
      M Offline
      Maximilien
      wrote on last edited by
      #2

      why ? fgets works well!


      Maximilien Lincourt Your Head A Splode - Strong Bad

      1 Reply Last reply
      0
      • K kamalesh82

        I want to read a line from a file which consist number of lines.In mfc library there is no function for "fgets"( am opening this file "CFile::Open(.....) function,with sharedeny access flagcheck).If any one can give me the hint to how to write this generic functiopnality using mfc, i'll be gratefull.

        kamalesh

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

        EIther you need to think about how you word your questions, or you're typing your homework direct into the site without any thought. My money is on the latter.

        Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog

        K 1 Reply Last reply
        0
        • C Christian Graus

          EIther you need to think about how you word your questions, or you're typing your homework direct into the site without any thought. My money is on the latter.

          Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog

          K Offline
          K Offline
          kamalesh82
          wrote on last edited by
          #4

          sorry i was at hurry.... I want to read a line from a file which consist number of lines.In mfc library there is no function for "fgets"( am opening this file "CFile::Open(.....) function,with sharedeny access flagcheck).If any one can give me the hint to how to write this generic functiopnality using mfc, i'll be gratefull.

          kamalesh

          M 1 Reply Last reply
          0
          • K kamalesh82

            sorry i was at hurry.... I want to read a line from a file which consist number of lines.In mfc library there is no function for "fgets"( am opening this file "CFile::Open(.....) function,with sharedeny access flagcheck).If any one can give me the hint to how to write this generic functiopnality using mfc, i'll be gratefull.

            kamalesh

            M Offline
            M Offline
            Maximilien
            wrote on last edited by
            #5

            did you try CStdIoFile ?


            Maximilien Lincourt Your Head A Splode - Strong Bad

            1 Reply Last reply
            0
            • K kamalesh82

              I want to read a line from a file which consist number of lines.In mfc library there is no function for "fgets"( am opening this file "CFile::Open(.....) function,with sharedeny access flagcheck).If any one can give me the hint to how to write this generic functiopnality using mfc, i'll be gratefull.

              kamalesh

              D Offline
              D Offline
              David Crow
              wrote on last edited by
              #6

              kamalesh82 wrote:

              In mfc library there is no function for "fgets"...

              Did you overlook CStdioFile::ReadString()?


              "Approved Workmen Are Not Ashamed" - 2 Timothy 2:15

              "Judge not by the eye but by the heart." - Native American Proverb

              K 1 Reply Last reply
              0
              • D David Crow

                kamalesh82 wrote:

                In mfc library there is no function for "fgets"...

                Did you overlook CStdioFile::ReadString()?


                "Approved Workmen Are Not Ashamed" - 2 Timothy 2:15

                "Judge not by the eye but by the heart." - Native American Proverb

                K Offline
                K Offline
                kamalesh82
                wrote on last edited by
                #7

                Am using 2004 MSDN. there is no such kind of function(CStdioFile::GetString()).

                kamalesh

                D 1 Reply Last reply
                0
                • K kamalesh82

                  Am using 2004 MSDN. there is no such kind of function(CStdioFile::GetString()).

                  kamalesh

                  D Offline
                  D Offline
                  David Crow
                  wrote on last edited by
                  #8

                  My bad. :-O I meant CString::ReadString().


                  "Approved Workmen Are Not Ashamed" - 2 Timothy 2:15

                  "Judge not by the eye but by the heart." - Native American Proverb

                  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