Blacknator
17-02-2004, 23:52
Ich kapiere das so langsam nicht mehr. Ich habe nach längerer Zeit es endlich geschafft daß ich mit Boost für C++ arbeiten kann.
Nun habe ich folgendes probiert:
#include "boost/filesystem/operations.hpp"
#include "boost/filesystem/path.hpp"
#include <iostream>
using namespace boost::filesystem;
main()
{
path my_path("/root/office52");
if (exists(my_path))
{
cout << "Verzeichnis vorhanden" << endl;
}
}
So weit so gut, das alles klappt schonmal.
Wenn ich aber statt dem Pfad
/root/office52
den Pfad
/root/.kde
verwende, bricht das Programm schon bei der initialisierung-deklaration ab, also bei
path my_path("/root/.kde");
Meiner Meinung nach ist der . im Verzeichnisnamen schuld.
Kann mir jemand weiterhelfen, für jede Antwort bin ich dankbar, thx.
Nun habe ich folgendes probiert:
#include "boost/filesystem/operations.hpp"
#include "boost/filesystem/path.hpp"
#include <iostream>
using namespace boost::filesystem;
main()
{
path my_path("/root/office52");
if (exists(my_path))
{
cout << "Verzeichnis vorhanden" << endl;
}
}
So weit so gut, das alles klappt schonmal.
Wenn ich aber statt dem Pfad
/root/office52
den Pfad
/root/.kde
verwende, bricht das Programm schon bei der initialisierung-deklaration ab, also bei
path my_path("/root/.kde");
Meiner Meinung nach ist der . im Verzeichnisnamen schuld.
Kann mir jemand weiterhelfen, für jede Antwort bin ich dankbar, thx.