?? myfuncdef.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 + -