Posted on 2005-05-01
I have a segment of program which creates file dynamically.. i.e. when if the number of files to be opened is to be decided at run time.. here is my code :::
for(i = 0;i<=N;i++) // N decide at runtime
printf("path = %s\n",str1);
fp1 = fopen(str1,"w");
This creates a file with no xtension.. and also the file name will be 0, 01,012 etc etc..
I have no problem with the file name but the problem is with its filetype.. How can i make those files as a .txt file inside the program itself..