\ aus Pfad entfernen
-
Gibt es da eine API-Finktion die mir aus "C:\bla\blup\blä.blü" "blä.blü" liefert??
Danke
cu para
-
Wozu eine API-Funktion?
mit
#include <string.h>
...
LPSTR P;
P = strrchr(Path, '\')+1;
gehts auch
-
PathFindFileName()
-
Danke King.
Könnte mir trotzdem schnell einer sagen wieso ich dann hier ne Ecception bekomme?// function to remove the \ of the file void utilGetNameFromPath(char *szFilename) { char *szBuffer; szBuffer = new char[strlen(szFilename)]; szBuffer = strrchr(szFilename, '\\')+1; MessageBox(0, szBuffer, 0, 0); strcpy(szFilename, szBuffer); }
-
Das geht ebenfalls net, steht nur Schrott da:
// function to remove the \ of the file void utilGetNameFromPath(char *szFilename) { /*char *szBuffer; szBuffer = new char[strlen(szFilename)]; szBuffer = strrchr(szFilename, '\\')+1; MessageBox(0, szBuffer, 0, 0); strcpy(szFilename, szBuffer);*/ strcpy(szFilename, PathFindFileName(szFilename)); }
-
Name der exe
Sorry!danke!
cu para