Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Input file location/directory

Status
Not open for further replies.

coldzonemt

Programmer
Jul 20, 2011
1
US
I'm VERY new to programming and am trying to compile a code (written in FORTRAN 77) I got for my research. My main problem is getting the code to read an input file. I've backed off the main code and tried a small example from a textbook that requires a simple input file, but I cannot get the code to read the input file, and I think this has to do with the file's location?

I'm sure there is something obvious I'm overlooking, but placing the input file in the same folder/location as the executable with the name that is called up in the program doesn't seem to work. My compiler is Microsoft Visual Studio 2008 and I'm using Windows XP. Any help would be very much appreciated!
 
Which F77 compiler are you using? You've told us the IDE.

If you are running from VS, get the project properties; under debug, set the working directory to where your input file lives.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top