tem80porary
Programmer
i have a project in which i need to run a c++ program from the command line in unix along with an input file and an output file. such as :
histogram1 < scores.txt > histogramOutput.txt
i want to use this line in unix, thus running a c++ file called histogram1 that will read in numbers from scores.txt and put all my output in histogramOutput.txt.
as far as i know, using this command runs the program, and anything i cout is put into histogramOutput.txt, but i am unable/unsure how to get anything from scores.txt.
if i was able to use the this command in unix :
histogram1 scores.txt histogramOutput.txt
then my problems would be over cause i could just get the names for the files from argc in main. but unfortunately i am not allowed to do that. if anyone can shed any light on this for me, i will be eternally grateful...
~tem80~
histogram1 < scores.txt > histogramOutput.txt
i want to use this line in unix, thus running a c++ file called histogram1 that will read in numbers from scores.txt and put all my output in histogramOutput.txt.
as far as i know, using this command runs the program, and anything i cout is put into histogramOutput.txt, but i am unable/unsure how to get anything from scores.txt.
if i was able to use the this command in unix :
histogram1 scores.txt histogramOutput.txt
then my problems would be over cause i could just get the names for the files from argc in main. but unfortunately i am not allowed to do that. if anyone can shed any light on this for me, i will be eternally grateful...
~tem80~