Tag Archives: libgen.h

Basename and Dirname

Often the unix commands basename and dirname are useful in shell scripts, but how do you use these in c or c++?. The C way: libgen.h If you’re working in c, the posix header libgen.h provides dirname and basename functions, with some limitations: They only work with char *, and dirname will modify the char * you pass into it … Continue reading

Posted in <code> | Tagged , , , , , , , , , | Leave a comment
<RSS Feed>