?? arithmetic.cpp
字號:
#include "StdAfx.h"
#include "Arithmetic.h"
//
// 根據位數來制作一個所有位全為“1”的十六進制的數,比如輸入 7 位
// 返回 0x7F,8位則返回 0xFF,即根據位數得到最大值
//
DWORD GetHexDataByBitNum(int nBitNum, BOOL bReverse/*=FALSE*/)
{
DWORD dwHex = 0;
for ( int i=0; i<nBitNum; i++ )
{
dwHex |= (1<<i);
}
if ( bReverse ) return (~dwHex);
return dwHex;
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -