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

📄 stdafx.cpp

📁 墨香最新私服
💻 CPP
字号:
// stdafx.cpp : source file that includes just the standard includes
//	ServerTool.pch will be the pre-compiled header
//	stdafx.obj will contain the pre-compiled type information

#include "stdafx.h"

char g_szHeroIDName[] = "hi";


char dir[256];
char* GetDirectory()
{
	GetCurrentDirectory( 256, dir );
	return dir;
}
char* GetDataDirectory()
{
	GetCurrentDirectory( 256, dir );
	strcat( dir, "/Data/" );
	return dir;
}

char* GetUserCountDirectory()
{
	GetCurrentDirectory( 256, dir );
	strcat( dir, "/UserCount/" );
	return dir;
}

void LOG( char* msg, ... )
{
	char buff[512];
	
	va_list vl;
	va_start( vl, msg );
	vsprintf( buff, msg, vl );
	va_end( vl );

	SYSTEMTIME time;
	char szTime[256];
	GetLocalTime( &time );
	sprintf( szTime, "%4d-%02d-%02d %02d:%02d:%02d", time.wYear, time.wMonth, time.wDay, time.wHour, time.wMinute, time.wSecond );

	FILE* file = fopen( "Log.txt", "a+" );
	if( file )
	{
		fprintf( file, "%s - %s\n", szTime, buff );
		fclose( file );
	}
}

⌨️ 快捷键说明

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