⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 debugerror.cpp

📁 RFID温度签的源码
💻 CPP
字号:
#include "stdafx.h"

#include "DebugError.h"

#ifdef __DEBUG__

#include <stdio.h>
#include <string.h>
#include <time.h>

void OutputLogToFile( const char* str )
{
	if( str )
	{
		FILE* pFile = fopen( DEBUG_LOG_FILE, "a" );
		if( pFile )
		{
			fprintf( pFile, "\0\r" );
			fprintf( pFile, str );
			fclose( pFile );
		}
	}
}

void OutputLogToFile1( const char* str, int val )
{
	if( str )
	{
		int nlength = (int)strlen( str );
		char *p = new char[nlength + 32];
		sprintf( p, str, val );
		OutputLogToFile( p );
		delete p;
	}
}

void OutputTimeToFile()
{
	//char ch[128];
	//struct tm *newtime;
	//time_t aclock;
	//time( &aclock );
	//newtime = localtime( &aclock );
	//sprintf( ch, "Time:%-2d.%-2d:%-2d:%-2d\t", newtime->tm_mday, newtime->tm_hour, newtime->tm_min, newtime->tm_sec );
	//OutputDebugLog( ch );
}

#endif // __DEBUG__

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -