#include
#include
struct node
{
int data;
struct node *next;
};
typedef struct node MODETYPE;
main()
{ MODETYPE s1,s2,s3,*begin,*p;
s1.data=100;
s2.data=200;
s3.data=300;
begin=&s1;
s1.next=...
分类:
其他好文 时间:
2014-08-09 11:43:57
阅读次数:
223
//5种迭代器,为了激活重载机制,定义的5个类型。每种迭代器就是一个类型。
struct input_iterator_tag{};
struct output_iterator_tag{};
struct forward_iterator_tag : public input_iterator_tag{};
struct bidirectional_iterator_tag:public fo...
分类:
其他好文 时间:
2014-08-09 11:43:17
阅读次数:
275
#include#includeusing namespace std;struct point{ int x, y;};point bufa[8] ={ {-2, 1}, {-1, 2}, {1, 2}, {2, 1}, {2, -1}, {1, -2}, {-1, -2}, {-2, -1}};...
分类:
其他好文 时间:
2014-08-09 11:29:47
阅读次数:
290
//BFS#include #include using namespace std;bool used[8][8];int move[8][2]={1,2, -1,2, -2,1, -2,-1, -1,-2, 1,-2, 2,-1, 2,1};struct position{ int i,j...
分类:
其他好文 时间:
2014-08-09 11:21:17
阅读次数:
245
enum Speed{ STOP, SLOW, NORMAL, FAST}Speed s = Speed.SLOW;switch(s) { case SLOW: break; }参考文献: Java Quick Syntax Reference by Mikael Olsson
分类:
编程语言 时间:
2014-08-09 04:53:16
阅读次数:
295
1 #include 2 #include 3 4 char en[11],fr[11]; 5 int st; 6 struct Tire{ 7 int next[26]; 8 char eng[11]; 9 }node[200005];10 void insert(char...
分类:
其他好文 时间:
2014-08-09 02:27:38
阅读次数:
266
/** \brief poj 3253
*
* \param date 2014/8/8
* \param state AC
* \return memory 1124K time 125ms
*
*/
#include
#include
#include
#include
using namespace std;
struct number
{
//int x;...
分类:
其他好文 时间:
2014-08-08 21:33:06
阅读次数:
291
1 递归,很简单
代码:
#include
using namespace std;
typedef struct node{
int data;
struct node * pNext;
}Node ,*pNode;
void createNode(pNode & pHead){
int temp;
scanf("%d",&temp);
pNode p,q;
boo...
分类:
其他好文 时间:
2014-08-08 21:28:56
阅读次数:
314
内存管理
页
内核把物理页作为内存管理的基本单位;内存管理单元(MMU,管理内存并把虚拟地址转换为物理地址)通常以页为单位进行处理。MMU以页大小为单位来管理系统中的页表。从虚拟内存的角度看,页就是最小单位。
32位系统:页大小4KB
64位系统:页大小8KB
在支持4KB页大小并有1GB物理内存的机器上,物理内存会被划分为262144个页。内核用 struct page 结构表示系统中...
分类:
系统相关 时间:
2014-08-08 21:25:26
阅读次数:
496
1.判断一个链表是否存在环,例如下面这个链表就存在一个环:例如N1->N2->N3->N4->N5->N2就是一个有环的链表c语言版: 1 #include 2 #include 3 4 struct link{ 5 int data; 6 struct link *next;...
分类:
其他好文 时间:
2014-08-08 21:10:56
阅读次数:
272