1.字符ch转换为数字nch
nch = ch - '0';
nch = ch&0xf;
2.HKEY_CLASSES_ROOT/.extfilename = AppName.version.extfilename
HKEY_CLASSES_ROOT/AppName.version.extfilename/shell/open/command = appdir/AppName.EXE %1
HKEY_CLASSES_ROOT/AppName.version.extfilename/DefaultIcon = resdllfilepath, id
@id是图标在资源文件中的序号
@应用程序的图标是资源中最小的id的图标
3.去掉字符的首尾空格(wchar_t* name, int count)
if ( count > 0 )
...{
int first = 0;
int last = count-1;
int cnt = 0;
for( cnt = 0; cnt < count; cnt++ )
...{
if ( name[cnt] != L' ' )
...{
break;
}
}
first = cnt;
for( cnt = count-1; cnt >= 0; cnt-- )
...{
if ( name[cnt] != L' ' )
...{
break;
}
}
last = cnt;
if ( last >= 0 && first < count )
...{
......
}
}4:swscanf的用法

wchar_t mm1[81]=...{0};
wchar_t mm2[81]=...{0};
wchar_t mm3[81]=...{0};
::swscanf(L"sd:ff", L"%[^:]:%[^:]:%[^:]:", mm1, mm2, mm3);
5:判断无符号整数是否是2的某次幂
bool Is2Exp(unsigned int n)
...{
return ( ( ~n + 0x01 ) & n ) == n ;
}6:(*(*FF)(int, int))(int)的含义
typedef int (*F)(int);
typedef int (*(*FF)(int, int))(int);
F fun(int, int)
...{
return NULL;
}ar -crv afile *.o
6555

被折叠的 条评论
为什么被折叠?



