Re: adding colums to text
- From: Barry Schwarz <schwarzb@xxxxxxxx>
- Date: Sun, 29 Jun 2008 00:25:15 -0700
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.
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.
Text files and linked lists, go together like hot dogs and mustard.
/* 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?
Remove del for email
.
- Follow-Ups:
- Re: adding colums to text
- From: pete
- Re: adding colums to text
- From: pete
- Re: adding colums to text
- References:
- adding colums to text
- From: Bill Cunningham
- Re: adding colums to text
- From: pete
- adding colums to text
- Prev by Date: Re: adding colums to text
- Next by Date: Re: how to release memory?
- Previous by thread: Re: adding colums to text
- Next by thread: Re: adding colums to text
- Index(es):