0

Hi, everyone, i am newbie to c++, but good in java, is there a way to access files in c++, i dont mean known you write in the program or write it as commnd line args.
something like getAbsolutePath() in java that can show any file.
thanx 4 u r help.

3
Contributors
3
Replies
4
Views
12 Years
Discussion Span
Last Post by Narue
0

I don't quite understand what you are asking. If you could clarify, I can give you a better answer. There is an excellent tutorial on opening and reading/writting files here.

Hope this helps!


Ed

Hi, everyone, i am newbie to c++, but good in java, is there a way to access files in c++, i dont mean known you write in the program or write it as commnd line args.
something like getAbsolutePath() in java that can show any file.
thanx 4 u r help.

0

I mean, instead of writing in my prog "C:\myfile.txt" is there a way for displaying or accessing system folders and files as in java getAbsolutePath() and system property.

what i am trying is to screen my system and look all files in a C:\,A:\,E:\ so the prog to will display

thanx 4 u r help.

0

>is there a way for displaying or accessing system folders and files
Yes, but it isn't built into the language. You will need to use a separate library or API. Might I suggest searching around on MSDN?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.