Ian Collins <ian-> wrote:
> On 08/16/11 12:49 PM, Edward Hvarregaard wrote:
> > I am having trouble getting started in C++ I have done some programming in
> > PASCAL where I had no problem finding the commands needed to deal with
> > directories, files and attributes. where can I find the similar commands
> > for C++ ?
> >
> > The startup code I need must do the following
> >
> > If "C:\SSF\ProgramFiles\Exch.txt" does not exist
> > then Setup
> >
> > Setup needs to be a function that creates missing path elements and an
> > empty "Exch.txt" file
> If boost filesystem doesn't meet your needs, use the C filesystem
> interface provided by your platform.
Perhaps a bit of extra information, extending on what Ian Collins
wrote, may help: not all systems have a notion of directories
(or files) in the sense you're probably used to. And if C++
would require functions to exist that handle directories and
files in the manner you were expecting it there couldn't be a
C++ compiler for those kinds of systems. Thus such functions
weren't made an integral part of C++ (Pascal may be able to
deal with this problem in a different way since it was origi-
nally intended as a "learning language" and probably wasn't
meant to be available on somewhat more "exotic" systems).
So you either have to use the functions that your system
supplies you with for these purposes. Since it looks a bit
as if you're using Windows perhaps the information at
http://msdn.microsoft.com/en-us/libr...=VS.85%29.aspx
(and below, especially "Directory Managment" and "File Managment")
could be useful for you. Otherwise asking in a newsgroup about
programming under Windows could be a useful option.
But if you want to be more system-inpedendent then there's
the boost library ian mentioned that tries to do just that,
see
http://www.boost.org/doc/libs/1_41_0.../doc/index.htm
Regards, Jens
--
\ Jens Thoms Toerring ___
\__________________________
http://toerring.de