On Tue, 1 Nov 2005, Jean Bréfort wrote: >> the input file is created in elsewhere ; since the path ~/ is interpreted >> as the user's home directory, then >> >> str << "~/mpqc" << setfill('0') << setw(4) << ifile_name_counter++ << ".in" << ends; >> ^^^ >> would make the files in user's home directory (haven't tried this though). > > This will not work. ~ is HOME only in the terminal. You must retrieve > the HOME directory with getenv("HOME"); Thanks for warning! Then I guess we should modify the line this way: str << getenv("HOME") << "/mpqc" << setfill('0') << setw(4) << ifile_name_counter++ << ".in" << ends; Thanks, Tommi