read a variable # of ints from the keyboard into array
Posted on 1998-06-12
I'm looking for a sample program that does exactly this: gets called from the command line to read in a variable number of integers which get stored into an array. After whatever manipulation (sorting, adding, multiplying various parts of the array) the array will be displayed back on the screen and the program ends. Usage should be:
FeedMe 383 22 82 99 1 93 3 82
for any amount of ints up to 100. I'd like sample code for FeedMe.cc and FeedMe.h, as well as a sample compile on gcc.
This should be really simple and hopefully someone has it lying around and can post it asap. Thanks.