Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <string.h>
- int main(int argc, char *argv[])
- {
- char * pch;
- pch = strtok (argv[0],"\\");
- int sizeAr = sizeof(pch)/sizeof(char);
- char* nameApp;
- while (pch != NULL)
- {
- nameApp = pch;
- pch = strtok (NULL, "\\");
- }
- printf("%s",nameApp);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment