// /* g++ -I/usr/local/libg++/gnu/include/g++ \ -DWITH_NAMESPACES -o str str.C -L/usr/local/libg++/gnu/lib32 -lg++ */ #include #include #include #include #include #include using namespace std; int main ( int argc, char *argv[]) { String file=argv[1]; String lfile; int current; lfile=file; for ( current = file.index('/'); current != -1; current = file.index('/',current+1) ) { lfile=file.from(current+1); printf("%d, %s\n", current, lfile.chars()); } printf("%s\n", lfile.chars()); }