易截截图软件、单文件、免安装、纯绿色、仅160KB

C/C++ 与运算和或运算转换大小写

// & 与,将指定位置设置为0     | 或,将指定位置设置为1
//注: 只针对纯字母的情况
#include <stdio.h>
#include <string>
int main()
{
char str[6] = "xxing";
std::string str1 = "INGXX";
for(int i = 0; i < 5; i++)
{
str[i] &= 0xdf;// 转大写 1101 1111
str1[i] |= 0x20;// 转小写 0010 0000

}
printf("xxing:%s\nINGXX:%s\n", str, str1.c_str());
return 0;
}



相关文档:

(windows下)用Eclipse搭建C/C++开发环境

--------如果你用的是或打算用Eclipse For C++,那么从这里看,
1. 首先下载Eclipse for C++, 最新版是基于Eclipse 3.5.2的,eclipse-cpp-galileo-SR2-win32.zip
2. 解压,直接运行。注意,至少JDK你已经安装了(我用的是JDK1.6)。运行后welcome页面出现,进入Tutorials。先读Tutorial是个好习惯。
3. 首先 什么是CDT... ......

Optimizing Your C/C++ Applications


C/C++ optimizing compilers are great--but there *are* a few techniques for hand-tuning your code to run as efficiently as possible on the AMD Athlon64 and Opteron processors, especially when developing DLLs, device drivers, or other performance-bound pieces of code.
Alan Zeichick  
Share | ......

C/C++中的64位整数(__int64 and long long)

  在做ACM题时,经常都会遇到一些比较大的整数。而常用的内置整数类型常常显得太小了:其中long 和 int
范围是[-2^31,2^31),即-2147483648~2147483647。而unsigned范围是[0,2^32),即
0~4294967295。也就是说,常规的32位整数只能够处理40亿以下的数。
  那遇到比40亿要大的数怎么办呢?这时就要用到C++的64位扩展 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号