Advertisement
Guest User

Untitled

a guest
Dec 20th, 2014
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.33 KB | None | 0 0
  1. void create_path(char *path, char *file_name, int file_index){
  2.    char string_index[10];
  3.    snprintf(string_index, 10, "%d", file_index);
  4.    #ifdef WIN32
  5.    strcpy(path, ".\\data\\");
  6.    #elif UNIX
  7.    strcpy(path, "./data/");
  8.    #endif
  9.    strcat(path, file_name);
  10.    strcat(path, string_index);
  11.    strcat(path, ".txt");
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement