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

📄 myfuncdef.h

📁 包中TMap
💻 H
字号:
#ifndef __MyFuncDef_H__
#define __MyFuncDef_H__

#include "TypeDef.h"

#include <stdio.h>
#include <string>
using std::string;

#ifdef _WIN32
#include <conio.h>
#else //linux or other...
#include <dlfcn.h>
#include <unistd.h>
#endif 


//公用函数定义
/*
#ifdef _WIN32
#define MyGetCh() getche()
#define MySleep(n)	Sleep(n)	//n-MillSecond
#else
#define MyGetCh() getchar()
#define MySleep(n)	usleep(1000*n)  //n-MillSecond
#endif
*/
//注意 不要通过上述宏方式定义函数,宏不进行类型检查,最好按如下定义
#ifdef _WIN32  //function define
inline int MyGetChe()
{
	return getche();
}
inline void MySleep( unsigned long nMilliSecond )
{
	Sleep( nMilliSecond );
}
#else  //for linux or other....//function define

inline int MyGetChe()
{
	return getchar();
}
inline void MySleep( unsigned long nMilliSecond )
{
	usleep( 1000 * nMilliSecond );  //#include <unistd.h>
}

#endif//function define

#endif //__MyFuncDef_H__

⌨️ 快捷键说明

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