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

📄 debug.cpp

📁 仿游戏 Diablo 的源代码
💻 CPP
字号:
#include <stdio.h>

FILE *debugfile;

int DebugInit( void )
{
	debugfile = fopen( "debug.log", "wt" );
	if( debugfile == NULL )
		return -1;
	else{
		fprintf( debugfile, "%s\n", "debug begin:" );
		return 0;
		}
}

void OutDebugString( char* str )
{
	fprintf( debugfile, "%s\n", str );
	fflush( debugfile );
}

void OutDebugInt( char *str, int i )
{
	fprintf( debugfile, "%s=%d\n", str, i );
}

void DebugEnd( void )
{
	fprintf( debugfile, "%s\n", "debug end." );
	fclose( debugfile );
}

⌨️ 快捷键说明

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