Please I need some help in C. I have a file with ".dat" format, how can i load it in C, into a variable, so that I can use the data for some math calculations later on?
thank you.

Recommended Answers

All 5 Replies

You have to know the file format before it is useful to you. The link that stupidenator posted will show you how to use the FILE to read a file, but that is useless if you don't know the details of what the file contains.

thx guys it did help me!

well actually Ancient Dragon, you are right, my file contains some data collected from the output of an Analog-to-Digital converter, I need to load these data and try to do some mathematical calculations to get some results. Can u help me with that?

>>Can u help me with that?
Probably, but not without knowing how the data was written :)

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.