2013年9月10日

摘要: 1 //http://solarianprogrammer.com/2011/10/12/cpp-11-regex-tutorial/ 2 #include 3 #include 4 #include 5 6 using namespace std; 7 using namespace std::tr1; 8 int main() 9 {10 string input;11 //regex integer("(\\+|-)?[[:digit:]]+");12 regex integer("(\\+|-)?[\\d]+");13 //regex inte. 阅读全文
posted @ 2013-09-10 21:53 zhiying678 阅读(87) 评论(0) 推荐(0) 编辑
摘要: http://msdn.microsoft.com/en-us/library/system.windows.forms.splitcontainer(VS.85).aspx 1 public partial class Form1 : Form 2 { 3 private System.Windows.Forms.SplitContainer splitContainer2; 4 private System.Windows.Forms.ListView listView2; 5 private Label nlab1... 阅读全文
posted @ 2013-09-10 16:40 zhiying678 阅读(152) 评论(0) 推荐(0) 编辑

2013年9月5日

摘要: 在看《编程珠玑》写了下开头的例子,贴下代码吧 1 #include "algorithm" 2 #include "set" 3 #include "string" 4 #include"iostream" 5 #include "map" 6 using namespace std; 7 8 int main() 9 {10 set S;11 string t;12 set::iterator j;13 while (cin>>t)14 {15 S.insert(t);16 }17 阅读全文
posted @ 2013-09-05 22:23 zhiying678 阅读(126) 评论(0) 推荐(0) 编辑

2013年9月4日

摘要: 遇到一个小bug记录下来。在ce上dll里采集两次读写网卡间的时间间隔数据, 1 //头文件中的声明 2 #define _TEST_IN_COMM_CYCLE_ 3 #define MAXLENBUF 131071 4 5 //类定义中添加的部分 6 #ifdef _TEST_IN_COMM_CYCLE_ 7 bool dumpfileflag; 8 enum _IN_TEST_FLAG{_IN_MEASURE=1,_IN_DUMP=2,IN_NEXT_FILE=3}; 9 int dumpfileaxisflag;// 10 unsign... 阅读全文
posted @ 2013-09-04 17:28 zhiying678 阅读(189) 评论(0) 推荐(0) 编辑

2013年7月19日

摘要: 感谢代码疯子的的这篇博客http://www.programlife.net/debugger-magic-number.html先帖代码 1 #include "stdafx.h" 2 #include "iostream" 3 #include "stdio.h" 4 #include "string.h" 5 #include "stdlib.h" 6 using namespace std; 7 const int nMaxSize=26; 8 typedef struct Node 9 阅读全文
posted @ 2013-07-19 14:58 zhiying678 阅读(180) 评论(0) 推荐(0) 编辑

2013年7月15日

摘要: 这个帖子,算是解惑了http://bbs.chinaunix.net/forum.php?mod=viewthread&tid=311058测试环境用的vs2008…… 1 #include "iostream" 2 using namespace std; 3 4 class Ttest 5 { 6 public: 7 int objcnt; 8 int descnt; 9 Ttest();10 ~Ttest();11 };12 Ttest::Ttest()13 {14 static int objcnt=0;15 ... 阅读全文
posted @ 2013-07-15 11:01 zhiying678 阅读(186) 评论(0) 推荐(0) 编辑

2013年6月28日

摘要: 先看一段代码:http://codepad.org/GZXrvsUE 1 #include"stdio.h" 2 int main() 3 { 4 char a=0xff; 5 if(a==0xff) 6 { 7 printf("char a is 0xff\n"); 8 } 9 else10 {11 printf("char a is not 0xff\n");12 }13 return 0;14 }结果输出是char a is not 0xff,很意外吧,因为a是带符号的,if比较的时候a被扩展... 阅读全文
posted @ 2013-06-28 11:37 zhiying678 阅读(676) 评论(0) 推荐(0) 编辑

2013年6月6日

摘要: P75 1 // hmjtestasm.cpp : 定义控制台应用程序的入口点。 2 // 3 4 #include "stdafx.h" 5 #include "stdio.h" 6 long MulOperator(void); 7 int DoWop(int dow,int op); 8 9 struct A{char a;long b;char c;long d;};10 #pragma pack(push,1)11 struct B{char a;long b;char c;long d;};12 #pragma pack(pop)13 int 阅读全文
posted @ 2013-06-06 14:34 zhiying678 阅读(271) 评论(0) 推荐(0) 编辑

2013年5月30日

摘要: 试图设置函数参数为ref,属性值不行,只读值也不行 哦错误 1 对只读字段无法传递 ref 或 out 参数(构造函数中除外) E:\sdusoft\20130528socjitterjixiechang\TestSystemV2\TestSystemV2\PacketWrapper.cs 35 40 TestSystemV22013年6月1日一个线程用于抓包立即保存,采用device.OnPacketArrival += arrivalEventHandler;另一个线程在线检测。GetNextPacket() invalid during background capture枚举错误:错误 阅读全文
posted @ 2013-05-30 16:35 zhiying678 阅读(603) 评论(0) 推荐(0) 编辑

2013年5月20日

摘要: 1 #include "iostream" 2 using namespace std; 3 4 typedef struct _AutoWithWheel 5 { 6 int enable:4; 7 int Axis:4; 8 int pulse:8; 9 10 }AutoWithWheel,*pAutoWithWheel;11 void main()12 {13 AutoWithWheel aww={0,0,0};14 char binaryarray[255];15 aww.pulse=-1;16 aww.enable=... 阅读全文
posted @ 2013-05-20 15:17 zhiying678 阅读(169) 评论(0) 推荐(0) 编辑

导航