一些C函数

统计整形参数的值为1的二进制位的个数

 

/* bitcount: count 1 bits in x */

int bitcount(unsigned x)

{

int b;

 

for(b=0; x != 0; x >>= 1)

if(x & 01)

b++;

return b;

}

 

 

 

squeeze(s1, s2),将字符串s1中任何与字符串s2中字符匹配的字符都删除

 

void squeeze(char s1[], char s2[])

{

int i=0,j=0,k=0,flag=0;

 

for(i=j=0; s1[i] != '/0'; i++)

{

flag=0;

for(k=0; s2[k] != '/0' && !flag; k++)

{

if(s2[k] == s1[i])

flag = 1;

}

 

if( !flag)

{

s1[j++] = s1[i];

}

}

s1[j] = '/0';

}

 

 

 

 

/* lower:  convert c to lower case; ASCII only */

int lower(int c)

{

if(c >= 'A' && c <= 'Z')

return c+'a'-'A';

else

return c;

}

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
可管理VS别名和启动优化等。 1、VSTweak is a small windows application that can be used to modify a number of hard to find settings. Using this small utility you can configure dynamic help, most recent lists, command aliases, file extensions, and more. This overview will walk through each of the various tabs and cover what settings can be manipulated from that tab. 2、The first tab contains an odd assortment of Visual Studio settings. The first section on this tab is the Help Settings section which provides an interface to enable or disable two parts of dynamic help. Dynamic Help is the name given to the feature that will automatically suggest help topics based on the context of what you are doing. Dynamic Help can be a great feature, but it also tends to slow down the IDE. If you don’t find that you benefit from dynamic help then disabling it here can speed up the IDE. 3、The second section, Import or Export Keyboard Bindings, is an easy to use interface for the management of keyboard bindings. Simply select the keyboard bindings that you want to export, click the export button, than select where to save the file. After saving the file you will then need to copy it to your new system, where you can then open VSTweak, click the Import button, and select your keyboard bindings file. Using this method you can move your configured keyboard bindings from system to system. 4、The last section on this tab, Clear History, can be used to clear a number of different history lists that exist in Visual Studio. These include the command list, browser history list, find history, as well as the replace history.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值