Hi! As you can see by my name I'm new to programming. I have a program that only works partially. It consists of two functions. One function creates a text file and reads it and the other one creates a binary file and reads it. The text file part works fine, but the binary part doesn't. It seems to create a file and write the contents but it doesn't read. So my question is why doesn't it read the contents of the file I created?
Thanks in advance!
totalnoob 0 Light Poster
Recommended Answers
Jump to Post>fread (&temp,amount*sizeof( *z_array ), 1 ,binaryfile);
temp is a float. Read your reference on fread again, double check the actual values you're passing it, and you'll see a problem.
All 3 Replies
Reply to this topic Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.