Visual Studio 11增强支持的标准 C++11 介绍
摘要:Visual Studio 11增强支持的标准 C + + 11现在支持此预览的 Visual Studio 的 STL 中的新头文件可以进行多线程编程和异步操作管理。<thread>,<future>,<atomic>,<time>,<mutex>,<condition_variable>,<ratio>,<filesystem>头文件<thread>作为其名称来创建和操作线程1.thread t([]()2. {3. cout << "ThreadID : &q
阅读全文
posted @
2012-10-23 12:06
Eternal Code
阅读(856)
推荐(0)
C++11新功能使用详细介绍
摘要:C++11 正则表达式基础知识介绍C++11开始支持正则表达式,使得处理文本更加简洁方便。C++11 支持六种正则表达式语法:ECMAScript, basic(POSIX Basic Regular Expressions), extended(POSIX Extended Regular Expressions ), awk(POSIX awk) , grep(POSIX grep ), egrep(POSIX grep –E)。其中ECMAScript最为强大。闲话不多说,首先来看正则表达式有哪些基本类型。basic_regex: 这是一个包含一个正则表达式的模板类。通常有两种特化方式:
阅读全文
posted @
2012-10-23 12:04
Eternal Code
阅读(781)
推荐(0)
单链队列的实现
摘要:#include<iostream>using namespace std;typedef enum { ERROR=0, OK=1,TRUE=1, FALSE = 0 } Status;typedef int QElemType;typedef struct QNode{ QElemType data; struct QNode *next;}QNode, *QueuePtr;typedef struct { QueuePtr front;//队头指针 QueuePtr rear; //队尾指针}LinkQueue;Status visit( QElemType e ){ pri
阅读全文
posted @
2012-10-23 11:51
Eternal Code
阅读(136)
推荐(0)
顺序表的实现
摘要:#include using namespace std;//常量值定义#define OK 1#define ERROR 0#define TRUE 1#define FALSE 0#define OVERFLOW -1#define UNDERFLOW -2#define LIST_INIT_SIZE 100#define LISTINCREMENT 10//函数返回值类型定义typedef int Status;//数据元素类型定义typedef int ElemType;//顺序表结构定义typedef struct{ ElemType *elem; int length; int l
阅读全文
posted @
2012-10-16 10:18
Eternal Code
阅读(242)
推荐(0)
顺序栈的实现
摘要:#include <stdio.h>#include<stdlib.h>#define LIST_INIT_SIZE 100#define LISTINCREMENT 10//函数返回值类型定义typedef enum { ERROR=0, OK=1,TRUE=1, FALSE = 0, OVERFLOW=-1, UNDERFLOW=-2 } Status;//数据元素类型定义typedef int ElemType;typedef struct{ElemType *base; //栈的存储空间的基地址,即栈底指针ElemType *top; //栈顶指针int max
阅读全文
posted @
2012-10-16 10:17
Eternal Code
阅读(296)
推荐(0)
链栈的实现
摘要:#include#includetypedef struct{int a;}ElemType;typedef enum { ERROR, OK } Status;typedef struct SNode{ElemType data;struct SNode *prior; //prior将指向其前一次入栈的元素}SNode, *SLink;Status InitStack( SLink &top )//构造一个空栈S, top 为栈顶,它唯一地确定一个栈。空栈时为NULL。{top = NULL;return OK;}//InitStackint StackEmpty( SLink *
阅读全文
posted @
2012-10-16 10:13
Eternal Code
阅读(243)
推荐(0)