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.

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.

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.

>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?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.