Re: adding colums to text
- From: pete <pfiland@xxxxxxxxxxxxxx>
- Date: Sun, 29 Jun 2008 05:53:19 -0400
Barry Schwarz wrote:
On Sat, 28 Jun 2008 23:11:13 -0400, pete <pfiland@xxxxxxxxxxxxxx>
wrote:
Bill Cunningham wrote:I have a row of values like such, placed in a text file by fprintf.Text files and linked lists, go together like hot dogs and mustard.
10.50
10.25
10.00
10.75
11.00
What I want to do to the above colum is add a new column right beside it which is a total of these values and then average them in another column. For example.
11.00 52.50
In another column is the average of the 5.
11.00 52.50 10.50
I am assuming that fprintf is going to have to be used and maybe freopen.
/* BEGIN new.c output */
File is open for writing.
File lines:
10.50
10.25
10.00
10.75
11.00
File is closed.
File is open for reading.
Reading file into a linked list...
File is closed.
snip code
Why on earth would you needlessly complicate such a simple task with
linked lists, especially given BC's previous posting history?
Because the discussions in this thread seem to be going nowhere.
--
pete
.
- References:
- adding colums to text
- From: Bill Cunningham
- Re: adding colums to text
- From: pete
- Re: adding colums to text
- From: Barry Schwarz
- adding colums to text
- Prev by Date: Re: Storing input into a character array
- Next by Date: Re: Is this legal C?
- Previous by thread: Re: adding colums to text
- Next by thread: Re: adding colums to text
- Index(es):
Relevant Pages
|