I'm trying to write a program which locates a text file in "my documents," and reads and displays what is on the file. I'm using the 2005 version of C++ and I might be using the wrong format. Thank you.

Recommended Answers

All 3 Replies

Check out the win32 api functions FindFirstFile() and FindNextFile(). They allow the program to iterate through all the files and directories in a folder. The compiler you are using will work well. When you create a new project you want to create a win32 console program, unless you want to add windows gui too, such as dialog boxes.

Member Avatar for iamthwee

>I'm using the 2005 version of C++

You do realise that doesn't make any sense. Also you've neglected to tell us what operating system you're on. Although "my documents" sounds pretty much like windoze.

>I'm using the 2005 version of C++

You do realise that doesn't make any sense. Also you've neglected to tell us what operating system you're on. Although "my documents" sounds pretty much like windoze.

It makes perfectly good sense to me, learn to think outside the box:mrgreen: -- Visual C++ 2005 and of course the os is MS-Windows.

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.