易截截图软件、单文件、免安装、纯绿色、仅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;
}



相关文档:

样例解析_C盘防毒批处理.bat

@echo off
@echo ╔┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉╗
@echo ┋ 心 如 止 水 ┋
@echo ┋ ┋
@echo ┋ DIY 个 性 BAT C 盘 防 毒 批 处 理 ┋
@echo ┋ ......

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位扩展 ......

C/C++ std::string 切词

用了三种方法...
#if 0
void StringTokenize(const std::string& strSrc, const std::string& strDelimit, std::vector<std::string>& vecSub)
{
if (strSrc.empty() || strDelimit.empty())
{
throw "tokenize: empty string\n";
......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号