解釋
函式名: fnmerge功 能: 建立新 檔案名
用 法: void fnerge(char *path, char *drive, char *dir);
程式例
#include#include
#include
int main(void)
{
char s【MAXPATH】;
char drive【MAXDRIVE】;
char dir【MAXDIR】;
char file【MAXFILE】;
char ext【MAXEXT】;
getcwd(s,MAXPATH); /* get the current working directory */
strcat(s,"\\"); /* append on a trailing \ character */
fnsplit(s,drive,dir,file,ext); /* split the string to separate elems */
strcpy(file,"DATA");
strcpy(ext,".TXT");
fnmerge(s,drive,dir,file,ext); /* merge everything into one string */
puts(s); /* display resulting string */
return 0;
}