#define DEBUG_FILE ".\\tmp\\debugmsg.txt"
 
 FILE* fd = fopen(DEBUG_FILE, "a");
 
这样子就可以了,当然先要保证tmp文件夹的是存在的.