Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
c++, unix, and file input
Name: Air_run Date: February 3, 2004 at 11:20:02 Pacific OS: Win XP Pro CPU/Ram: dual Athlon 2400+, 3/4 of
Comment:
I need to write some code that will allow a user to enter a full path for an input file in UNIX. I've tried declaring a string, having the user enter a path, and passing that string to the .open method. The compiler keeps coming up with an error. Any suggestions??
jpsu.cpp:15127: no matching function for call to `fstream::open (string &, ios::open_mode)' /usr/local/lib/gcc-lib/sparc-sun-solaris2.8/2.95.2/../../../../include/g++-3/fstream.h:89: candidates are: void fstream::open(const char *, int, int = 436)
0
Response Number 2
Name: Air_run Date: February 3, 2004 at 18:33:20 Pacific
Reply:
That looks about right...except that I'm using a different compiler. Other than the path, the rest of the error looks the same.
Summary: I'm making a program for my linux box that will output the contents of various log and config files. I've made a vecotr with the string values of the files to open. I have a loop that take input fro...
Summary: All my C++ applications call a file called: C:\Program Files\CHAZCO\registry.ini to load their settings via an INI class. However, my new application, standalone, no installer, needs to be able to che...
Summary: I'm trying to write a program that asks the user for for a couple parameters and then uses system("") to run a unix shell command. I can't seem to get these variables into the command string. For ex...