摘要: 1. 在一个单链表中p所指结点之前插入一个s (值为e)所指结点时,可执行如下操作:q=head;while (q->next!=p)q=q->next;s= newNode; s->data=e;q->next= ; //填空s->next= ; //填空2. 线性表的顺序存储结构是一种 的存储结构,而链式存储结构是一种___的存储结构。A.随机存取 B.索引存取 C.顺序存取 D.散列存取3. 线性表若采用链式存储结构时,要求内存中可用存储单元的地址___。A. 必须是连续的 B. 部分地址必须是连续的C. 一定是不连续的 D. 连续或不连续都可以4. 在一个 阅读全文
posted @ 2013-08-23 13:37 CPYER 阅读(436) 评论(0) 推荐(0)
摘要: 一. 什么是拷贝构造函数首先对于普通类型的对象来说,它们之间的复制是很简单的,例如:1 int a = 100; 2 int b = a; 而类对象与普通对象不同,类对象内部结构一般较为复杂,存在各种成员变量。下面看一个类对象拷贝的简单例子。 1 #include 2 using namespace std; 3 4 class CExample { 5 private: 6 int a; 7 public: 8 //构造函数 9 CExample(int b) 10 { a = b;} 11 12 ... 阅读全文
posted @ 2013-08-23 11:26 CPYER 阅读(1826) 评论(0) 推荐(0)
摘要: STL备忘(转)1. string.empty() 不是用来清空字符串,而是判断string是否为空,清空使用string.clear();2. string.find等查找的结果要和string::npos比较,而不是和-1比较。(各个平台可能不同)3. 将string转为char * ,用char * t = (char *)s.c_str() ,而不是 char *t =s.begin() 或者 char *t = &s[0] 或者 char *t =s.data();4. 不要用错string.find ,string::find_first_of ,find和find_fir 阅读全文
posted @ 2013-08-23 10:38 CPYER 阅读(515) 评论(0) 推荐(0)
摘要: 环境:vc2003.h 1 /* MD5.H - header file for MD5C.C 2 */ 3 4 /* Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All 5 rights reserved. 6 7 License to copy and use this software is granted provided that it 8 is identified as the "RSA Data Security, Inc. MD5 Message-Digest 9 Algorithm&quo 阅读全文
posted @ 2013-08-23 10:11 CPYER 阅读(611) 评论(0) 推荐(0)
摘要: 1.窗口信息1 //MS 为我们提供了打开特定桌面和枚举桌面窗口的函数。2 hDesk=OpenDesktop(lpszDesktop,0,FALSE,DESKTOP_ENUMERATE);3 //打开我们默认的Default 桌面;4 GetWindowText(hWnd,szWindowText,dwMaxCount);//取得编辑框中的文字5 GetWindowThreadProcessId(hWnd,&dwPID);2.磁盘信息 1 //获得系统所有磁盘的信息,包括软盘,硬盘,光盘等等; 2 GetLogicalDriveStrings(dwBufferLength,lpBuf 阅读全文
posted @ 2013-08-23 10:03 CPYER 阅读(719) 评论(0) 推荐(0)