debug.cpp
来自「模仿暗黑1做的游戏」· C++ 代码 · 共 32 行
CPP
32 行
#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 + =
减小字号Ctrl + -
显示快捷键?