SyntaxFix
Write A Post
Hire A Developer
Questions
Use boost::filesystem, that will give you a portable way of doing those kinds of things and abstract away all ugly details for you.