小问题

 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  ( ( ~+ 0x01 ) & n ) == n ;

}

 6:(*(*FF)(int, int))(int)的含义

 

typedef int (*F)(int);
typedef 
int (*(*FF)(intint))(int);
F fun(
intint)
{
    
return NULL;
}
7:ASP.NET 修改HTML元素
   在网页中拖个HTML 控件,runat属性设置成server,在c#代码中就可以通过id名称来访问
8:Div居中
    div{width:800px;margin:0 auto;height:50px;background:#00FFFF}
9:GCC
    gcc  -o targetfile srfile -Iincludedir -Llibdir

    ar -crv afile *.o

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值