writting / reading signal points to a file in c

F

fdunne2

How do you write/read a list of siganl points into a c program? each point is on a seperate line.
 
R

Robert B. Clark

How do you write/read a list of siganl points into a c program? each point is on a seperate line.

fgets, presumably.

More detail would be helpful.
 
T

Thomas Matthews

fdunne2 said:
How do you write/read a list of siganl points into a c program? each point is on a seperate line.

What constitutes a siganl [sic] point?
Are they numbers? Are they in decimal integers? Floating point?
Are the points in binary format?
What separates one ordinate from the other?

Here are some functions used for reading from files:
fscanf
fgets
fgetc
fread

The techniques are to read each ordinate individually,
or read in a record into a buffer then use other
functions to extract the data from the buffer.

--
Thomas Matthews

C++ newsgroup welcome message:
http://www.slack.net/~shiva/welcome.txt
C++ Faq: http://www.parashift.com/c++-faq-lite
C Faq: http://www.eskimo.com/~scs/c-faq/top.html
alt.comp.lang.learn.c-c++ faq:
http://www.raos.demon.uk/acllc-c++/faq.html
Other sites:
http://www.josuttis.com -- C++ STL Library book
http://www.sgi.com/tech/stl -- Standard Template Library
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,143
Latest member
SterlingLa
Top