Floating point binary data

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dschulenburg
    New Member
    • Oct 2006
    • 40

    Floating point binary data

    How do I read in a floating point binary data file ? And how can I then loop through each point of it ?
  • horace1
    Recognized Expert Top Contributor
    • Nov 2006
    • 1510

    #2
    Originally posted by dschulenburg
    How do I read in a floating point binary data file ? And how can I then loop through each point of it ?
    have a look at Binary Files in
    http://www.cplusplus.c om/doc/tutorial/files.html

    how was the binary file created?

    Comment

    • dschulenburg
      New Member
      • Oct 2006
      • 40

      #3
      It's written in C with the fwrite command.

      Comment

      • horace1
        Recognized Expert Top Contributor
        • Nov 2006
        • 1510

        #4
        Originally posted by dschulenburg
        It's written in C with the fwrite command.
        you can use fread() with either C or C++
        http://www.cplusplus.c om/reference/clibrary/cstdio/fread.html

        or in C++ ifstream
        http://www.cplusplus.c om/doc/tutorial/files.html

        Comment

        • dschulenburg
          New Member
          • Oct 2006
          • 40

          #5
          Great Thanks, the example is very good. How do I then loop trhough the buffer to write into text using fprintf ?

          Comment

          • dschulenburg
            New Member
            • Oct 2006
            • 40

            #6
            It works, thanks for your help !

            Comment

            Working...