Re: I need some ideas on how to go about creating files....



On Jun 28, 7:54 pm, K-mart Cashier <cdal...@xxxxxxxxx> wrote:
On Jun 28, 7:32 pm, Eric Sosman <esos...@xxxxxxxxxxxxxxxxxxx> wrote:



K-mart Cashier wrote:
Program A reads in a file. However, Program A dictates the the person
creates an input file. After the person creates the file, they have to
change the following lines to the path of the file they created.

#define PATH "/home/calten/run/data"

Now, there has to be some better way than just having the user edit
the source code and recompile it everytime they want to change the
file name.

I'm sure there is something pretty obvious that I missed. Ideas?

Input redirection, command-line arguments, environment
variables, prompt-and-response, ...

--
Eric Sosman
esos...@xxxxxxxxxxxxxxxxxxx

I'm not too sure how I would go about this using environment
variables. I guess it's time for me to crack out "Unix Programming for
minimum wage clerks that got rejected twice by UC-Berkeley."


Actually when I think about this, I'm really not that sure what input
redirection is.

.



Relevant Pages

  • Re: what is wrong with this code?can someone walk me through this?
    ... particle in a low reynolds number flow. ... compilers, I have a working version of this code, but it doesnt work ... with the input file and see for what values of input the stokes number ... Is this fixed format or free format source code? ...
    (comp.lang.fortran)
  • Re: I need some ideas on how to go about creating files....
    ... creates an input file. ... the source code and recompile it everytime they want to change the ... minimum wage clerks that got rejected twice by UC-Berkeley." ... use standard shell facilities to make it work with different files, ...
    (comp.unix.programmer)
  • Re: I need some ideas on how to go about creating files....
    ... creates an input file. ... the source code and recompile it everytime they want to change the ... I'm not too sure how I would go about this using environment ... minimum wage clerks that got rejected twice by UC-Berkeley." ...
    (comp.unix.programmer)
  • Re: Link warning and error, what do they mean?
    ... Okay, for anybody that cares... ... I don't know why the compiler didn't tell me it couldn't ... find the source code, but it couldn't, and then tried to use the input file ...
    (microsoft.public.vc.ide_general)