摘要: 1.获得系统时间 time(NULL); 2.时间戳转换成日期 #include #include using namespace std;int main(){ char szBeginTime[32] ={0}; time_t tmBeginTime = ... 阅读全文
posted @ 2011-10-30 01:16 byfei 阅读(40) 评论(0) 推荐(0) 编辑
摘要: 1.工程导入 http://v.ku6.com/show/LlpGiWXVi59AwlLa.html Eclipse从SVN checkout并创建项目 https://blog.csdn.net/yasi_xi/article/details/127529... 阅读全文
posted @ 2011-10-24 15:01 byfei 阅读(57) 评论(0) 推荐(0) 编辑
摘要: http://v.ku6.com/show/LlpGiWXVi59AwlLa.html 阅读全文
posted @ 2011-10-24 15:00 byfei 阅读(102) 评论(0) 推荐(0) 编辑
摘要: C语言中auto,register,extern,static C语言中提供了存储说明符auto,register,extern,static说明的四种存储类别。四种存储类别说明符有两种存储期:自动存储期和静态存储期。其中auto和register对应自动存储期。具有自动存储期的变量在进入声明该变量的程序块是被建立,它在该程序块活动时存在,退出该程序块时撤销。关键字extern和static用来说明具有静态存储期的变量和函数。用static声明的局部变量只能被定义该变量的函数所识别,但是不同于自动变量的是,static变量在其函数被调用退出后,仍保留其值。下次函数被调用时,可以访问最近一次被修 阅读全文
posted @ 2011-10-23 22:27 byfei 阅读(488) 评论(0) 推荐(0) 编辑
摘要: 一、下微软的补丁:KB948127补丁来解决,http://code.msdn.microsoft.com/KB948127。貌似安装了也不起作用二、如果下载的补丁没安装成功或下载失败,可以用下面的方法手工来改工程设置项目(Project)->属性(Property)->链接器(Linker)->常规(General) 下面的“启用增量链接(Enable Incremental Linking)”,将“是(/INCREMENTAL)”改为“否(/INCREMENTAL:NO)”。不过这又引入了另外一个警 告:FormatCom.obj : warning LNK4075: 忽 阅读全文
posted @ 2011-10-23 11:05 byfei 阅读(147) 评论(0) 推荐(0) 编辑
摘要: #include <iostream>using namespace std;void main(){enum{test1,test2,test3,test4};int i=test4;cout<<i<<endl;getchar();} 阅读全文
posted @ 2011-10-20 10:56 byfei 阅读(936) 评论(0) 推荐(0) 编辑
摘要: #include <iostream>using namespace std;char* Int2String(int nData){ char szBuffer[1024] = {0}; sprintf(szBuffer,"%d",nData ); return szBuffer;}void main(){ cout<<Int2String(4546)<<endl; getchar();} 阅读全文
posted @ 2011-10-19 23:50 byfei 阅读(164) 评论(0) 推荐(0) 编辑
摘要: #include <iostream>#include <stdio.h>using namespace std;void main(){string stc="123";int test1;sscanf(stc.c_str(),"%d", &test1);if(test1==123)cout<<test1<<endl;getchar();} 阅读全文
posted @ 2011-10-19 10:30 byfei 阅读(111) 评论(0) 推荐(0) 编辑
摘要: #include <iostream>#include <string.h>#include <stdio.h>#include <map>using namespace std;class MapTemplate{public:typedef map <int ,string> templatemap;templatemap testmap;templatemap::iterator Find(int nID){return testmap.find(nID);}string GetElement(int nID){template 阅读全文
posted @ 2011-10-18 17:59 byfei 阅读(105) 评论(0) 推荐(0) 编辑
摘要: Map是STL的一个关联容器,它提供一对一(其中第一个可以称为关键字,每个关键字只能在map中出现一次,第二个可能称为该关键字的值)的数据处理能力,由于这个特性 map内部的实现自建一颗红黑树(一种非严格意义上的平衡二叉树),这颗树具有对数据自动排序的功能。... 阅读全文
posted @ 2011-10-18 17:35 byfei 阅读(46) 评论(0) 推荐(0) 编辑