please help! how can I load a file in C?

Reply

Join Date: Feb 2008
Posts: 18
Reputation: Cbeginner_us is an unknown quantity at this point 
Solved Threads: 0
Cbeginner_us Cbeginner_us is offline Offline
Newbie Poster

please help! how can I load a file in C?

 
0
  #1
Mar 4th, 2008
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.
Reply With Quote Quick reply to this message  
Join Date: Mar 2005
Posts: 192
Reputation: stupidenator is an unknown quantity at this point 
Solved Threads: 4
stupidenator's Avatar
stupidenator stupidenator is offline Offline
Junior Poster

Re: please help! how can I load a file in C?

 
0
  #2
Mar 4th, 2008
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 15,408
Reputation: Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute 
Solved Threads: 1469
Team Colleague
Featured Poster
Ancient Dragon's Avatar
Ancient Dragon Ancient Dragon is offline Offline
Still Learning

Re: please help! how can I load a file in C?

 
0
  #3
Mar 4th, 2008
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.
Don't PM me with questions -- you might get a nasty PM in response. If you have a question then post it in one of the forums.
Reply With Quote Quick reply to this message  
Join Date: Feb 2008
Posts: 18
Reputation: Cbeginner_us is an unknown quantity at this point 
Solved Threads: 0
Cbeginner_us Cbeginner_us is offline Offline
Newbie Poster

Re: please help! how can I load a file in C?

 
0
  #4
Mar 4th, 2008
thx guys it did help me!
Reply With Quote Quick reply to this message  
Join Date: Feb 2008
Posts: 18
Reputation: Cbeginner_us is an unknown quantity at this point 
Solved Threads: 0
Cbeginner_us Cbeginner_us is offline Offline
Newbie Poster

Re: please help! how can I load a file in C?

 
0
  #5
Mar 6th, 2008
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?
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 15,408
Reputation: Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute 
Solved Threads: 1469
Team Colleague
Featured Poster
Ancient Dragon's Avatar
Ancient Dragon Ancient Dragon is offline Offline
Still Learning

Re: please help! how can I load a file in C?

 
0
  #6
Mar 6th, 2008
>>Can u help me with that?
Probably, but not without knowing how the data was written
Don't PM me with questions -- you might get a nasty PM in response. If you have a question then post it in one of the forums.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC