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.
Java File I/O
Name: jerrym Date: March 10, 2005 at 09:41:17 Pacific OS: Win XP CPU/Ram: 3 G
Comment:
I have two questions regarding file I/O:
(1) If I want to open data.txt in C:\test directory, how to pass directory name to FileInputStream?
I know how to open data.txt in current directory: FileInputStream in = new FileInputStream("data.txt")
How to pass C:\test to FileInputStream?
Is the following code right? FileInputStream in = new FileInputStream("C:\test\data.txt")
(2) How to get a list of file names under C:\test directorr? I want to get a vector of file names under C:\test directory. How to do this?
Summary: NP I'm not an expert in OOP, but I presume ofstream and ifstream are simply objects in the fstream class. C file i/o is a little more involved and I often have to think about it before I try it so thi...
Summary: Please help i just have been put through a project in C i have never done C before so I have to learn while I am doing the project here is the problem i am having: i started to do some File I/o this ...
Summary: Hi all, before i begin, yes this is an homework assignment question... got a c++ file I/O question. here is the code that i've so far. #include <iostream> #include <sting> #include <fstream> ...