01 2007 档案

file i/o (base)
摘要:#include #include //for the file iostream#include //for the exit(EXIT_FAILURE)const int size=20;int main(void){ using namespace std; char filename[size]; int arr[5]; ofstream outfile; cout>arr... 阅读全文

posted @ 2007-01-30 23:47 Edward Xie 阅读(133) 评论(0) 推荐(0)

字符函数库cctype(部分)
摘要:isalnum() 字母 数字 return trueisalpha() 字母 return trueisblank() 空格 tab return trueiscntrl() 控制字符 ... 阅读全文

posted @ 2007-01-28 16:32 Edward Xie 阅读(278) 评论(0) 推荐(0)

优先级问题(部分)
摘要:NOT(!) > AND(&&) > OR (||) 阅读全文

posted @ 2007-01-28 16:30 Edward Xie 阅读(77) 评论(0) 推荐(0)

几种强转
摘要:float a = 1.0f;cout << (int)a << endl;cout << (int&)a << endl; //把a在内存里的储存形式直接打印出来int *b = (int*)(&a);//int指针强转 a址 赋给 b指针cout<<*b<<endl;解除引用b指针/////////////////////////////////////////////一个普通的float到... 阅读全文

posted @ 2007-01-26 19:25 Edward Xie 阅读(401) 评论(0) 推荐(0)

cstring(部分)
摘要:strcmp////////////////////strlen/////////////////////strcat///////////////////strcpy ////////////////////////strchr strchr("wstq", choice)返回 choice 在 “wstq”中出现的地址 无则返NULL@函数名称: strd... 阅读全文

posted @ 2007-01-26 19:25 Edward Xie 阅读(254) 评论(0) 推荐(0)

string(部分)
摘要:#include string str1;str1.size();//////////////////////////////////struct strM{ std::string str2;};strM strM1;strM1.str2="str"; 阅读全文

posted @ 2007-01-21 23:05 Edward Xie 阅读(99) 评论(0) 推荐(0)

ctime(部分)
摘要:clock_t // system typedef for clock() return (long in vc++6.0)clock() // get system timeCLOCKS_PER_SEC // system time / sectime(0);// include srand(time(0)); rand... 阅读全文

posted @ 2007-01-21 23:05 Edward Xie 阅读(307) 评论(0) 推荐(0)

cout流(部分)
摘要:int a;cout.put(char(a));////////////////////////////cout.put(asc)///////////////////////////////////cout.put('char');//////////////////////////////////////cout.setf(ios_base::fixed,ios_base::floatfiel... 阅读全文

posted @ 2007-01-21 23:04 Edward Xie 阅读(208) 评论(0) 推荐(0)

cin流(部分)
摘要:cin>>a;忽略 空格,换行符,tab/////////////////////////////////////////////////////////////cin.get(ArrName ,size);//对换行符,保留在输入流。到达行尾或读到size-1个字符为止 //可以接受第3个参数表示读取结束表记符 ep: char ... 阅读全文

posted @ 2007-01-21 23:04 Edward Xie 阅读(228) 评论(0) 推荐(0)

二维数组元素地址与值表示
摘要:a[3][3] 址(1) 址(2)a[0]->a[0]+0 a[0]+1 a[0]+2 a+0->*(a+0)+0 *(a+0)+1 *(a+0)+2 a[1]->a[1]+0 a[1]+1 a[1]+2 a+1->*(a+1)+0 *(a+1)+1 *(a+1)+2 a... 阅读全文

posted @ 2007-01-21 23:03 Edward Xie 阅读(473) 评论(0) 推荐(0)