业精于勤,荒于嬉。

摘要: #include <iostream>#include <time.h>using namespace std;int main(int arg,char* args[]){time_t now2;time(&now2);struct tm* fmt2=localtime(&now2);.cout << "小时:\t" << fmt2->tm_hour << endl;cout << "分钟:\t" << fmt2->tm_min <&l 阅读全文
posted @ 2012-09-01 21:30 叶知泉 阅读(172) 评论(0) 推荐(0) 编辑
摘要: void MyMethod1() { using namespace std; int a=6; int b=6; int* pa=new int; int* pb=new int; *pa=a; pb=pa; cout<<"pa的内容赋值为:"<<a<<endl; delete(pa); //free(pa);//加上这句造成pa不可用, //cout<<"free(pa);之后试试能不能读取pa:"<<pa<<endl;//实验证明会挂掉程序 //cout<<&quo 阅读全文
posted @ 2012-09-01 21:27 叶知泉 阅读(3316) 评论(0) 推荐(0) 编辑