jason_box opined:
Posting the same question every 15 minutes only *reduces* the
probability that it will be answered. This is Usenet, an asynchronous
medium, not a message board.
I'm trying to parse a data file that has two colums, both columns
should contain numerical values and I would like them to be stored
that way for now into two seperate arrays. I was wondering whats the
best way of doing this?
file:
112 56
344 3
233 9
This simple program just counts the number of characters and line
that I pipe into the program and I was wondering how to take it to
the next step.
-
-
<snip line/char counting code (most likely) from K&R>
-
-
A clever ploy, this: Copying some code only vaguely related to the
(homework) problem at hand.
I suggest you go back to your textbook and look up arrays, loops, and
input/output functions. I'd suggest `fgets()` and `sscanf()`, although
plain `scanf()` is probably OK if you're only dealing with numbers.
--
"I'd crawl over an acre of 'Visual This++' and 'Integrated Development
That' to get to gcc, Emacs, and gdb. Thank you."
(By Vance Petree, Virginia Power)
<http://clc-wiki.net/wiki/Introduction_to_comp.lang.c>