Utility.cpp
资源名称:语音程序.rar [点击查看]
上传用户:lczygg
上传日期:2007-07-03
资源大小:2947k
文件大小:1k
源码类别:
语音合成与识别
开发平台:
Visual C++
- #include "stdafx.h"
- const char strDebugFile[] = "debug.txt";
- void ResetLog()
- {
- FILE * fp = fopen( strDebugFile, "wt");
- fprintf(fp, "nnstart logging:nn");
- fclose(fp);
- }
- void Log(char *string)
- {
- FILE * fp = fopen( strDebugFile, "at");
- if (fp != NULL)
- {
- fprintf( fp, string);
- }
- fclose(fp);
- }
- void Log(char *string, char *p1)
- {
- FILE * fp = fopen( strDebugFile, "at");
- if (fp != NULL)
- fprintf( fp, string, p1);
- fclose(fp);
- }
- void Log(char *string, int n1)
- {
- FILE * fp = fopen( strDebugFile, "at");
- if (fp != NULL)
- fprintf( fp, string, n1);
- fclose(fp);
- }