自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

大飞的江湖

天地不仁以万物为刍狗

  • 博客(6)
  • 收藏
  • 关注

原创 C++ 位域操作 置0置1

bitset bp; unsigned char up = 0; cout << bp << endl; cout << (unsigned)up << endl; bp.set(3); up = up | (1UL<<3); cout << bp << endl; cout << (unsigned)up << endl; bp.reset(3); up = up &

2015-02-06 15:47:53 1112

原创 C++ 数组转换vector

int arr[] = {1,2,3,4,5};vector varr(arr, arr+5);

2015-02-06 14:56:20 22334 3

原创 C++ string to char *

string s = "yangshaofei";const char *p = s.c_str();

2015-02-06 14:47:09 3715

原创 C++ biteset

#include #include using namespace std;int main(){ bitset b1; bitset b2("00001111");//不能用非0\1字符初始化或赋值 bitset b3(0xff); bitset b4(0xff); if (b2.any())//has 1 bit ? { cout << "b2 has 1 i

2015-02-05 15:55:21 1348

原创 C++ vector

#include #include #include using namespace std;int main(){ string word; vector v1; //while (cin >> word) //{ // v1.push_back(word); //} for (vector::size_type ix = 0; ix != 10; ++ix)

2015-02-05 14:21:08 465

原创 VS2010 C++变量初始化global local

C++ Primer中文第四版习题#include #include using namespace std;string global_str;int global_int;int main(){ string local_str; int local_int; cout << global_str << endl; cout << global_int << e

2015-02-04 11:59:54 1543

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除