000
08.07.2005, 22:08 Uhr
Skippy
|
so erstmal die fehlermeldung
no matching function for call to `strlen(std::basic_string<char, std::char_traits<char>, std::allocator<char> >&'
CDev-Cpp\include\string.h:49 candidates are: size_t strlen(const char*)
expected primary-expression before "path"
expected `)' before "path"
no matching function for call to `strcat(std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, const char[2])'
CDev-Cpp\include\string.h:41 candidates are: char* strcat(char*, const char*)
so nun der ausschnitt um dem es geht
C++: |
else { path = get_req;
// Suche nach letztem Backslash std::string::size_type lastfile = path.rfind("/"); std::string urlfile = path.substr(lastfile+1); ufilename = urlfile;
// Suche nach einem Punkt if (urlfile.find(".") == std::string::npos) { ufilename ="index.html";
//sprintf(path, "htdocs%s", path); if (path[strlen(path) - 1] != '/') strcat(path, "/");
}
std::string::size_type lastext = path.rfind("."); std::string urlext = path.substr(lastext+1); ufileext = urlext;
} }
|
hat jemand ne idee worans liegt? |