编程语言更迭至今,几乎没有人没有用过一门不用垃圾回收的语言,一方面因为C之类的语言内存管理较为困难,更重要的是因为语言越高级,越注重实际的业务逻辑,而关于内存管理的代码频繁夹杂在业务中,并不那么自然。###
没有垃圾回收的编程体验 #include #include struct node { .....
分类:
其他好文 时间:
2014-05-05 21:49:59
阅读次数:
329
??
#include
#include
typedef struct emp{
char sex[8];
char name[15];
int age;
}*emp;//这里我们用typedef把emp这个结构体变成了*emp这种指向结构体成员的结构体指针
/*typedef struct emp{
char sex[8];
char name[15];
int...
分类:
编程语言 时间:
2014-05-05 12:54:29
阅读次数:
277
1 typedef signed char qint8; /* 8 bit signed */ 2
typedef unsigned char quint8; /* 8 bit unsigned */ 3 typedef short qint16; /* 16
bit signed */ 4 ty....
分类:
其他好文 时间:
2014-05-05 11:39:45
阅读次数:
503
简介:高级开发是高度异步的,PromiseKit收集了一些帮助函数,让我们开发过程中使用的典型异步模式更加令人愉悦。1.通过pod安装promisekit:2.
promise.h介绍@import Foundation.NSObject;typedef void (^PromiseResolver...
分类:
移动开发 时间:
2014-05-04 19:10:54
阅读次数:
812
// BTree.cpp : 定义控制台应用程序的入口点。
//
#include "stdafx.h"
#include"stdlib.h"
#include"malloc.h"
#define BT BTreeNode
#define MS 10
typedef struct BT{
char data;
struct BT *left;
struct BT *right;
}BT;
...
分类:
其他好文 时间:
2014-05-04 12:45:34
阅读次数:
365
1,指针没有指向一块合法的区域1指针没有初始化12345678910111213#include #include struct aa{char
*pa;char c;}ssa,*ssb;void main(){strcpy(ssa.pa,"abc");printf("%s \n",ssa.pa);...
分类:
其他好文 时间:
2014-05-04 11:38:09
阅读次数:
278
typename与class都可以用作模板形参定义的关键字,两者无异~~
可是,typename的用途并非仅限于此,如下面的代码:
{CSDN:CODE:323655}
在上述代码中,iter的类型是C::const_iterator,实际的类型取决于C的类型。const_iterator 同时也是C内部的typedef 类型名。 但是,在此处,编译器的行为不会是你预期的...
分类:
编程语言 时间:
2014-05-04 00:19:35
阅读次数:
330
1 typedef 和 define
的区别#define是简单的替换;typedef是别名!12#define pchar char *pchar a,b;//展开后 char
*a,b;a为指针,b不是12typedef char* pchar;pchar a,b;//a b均为指针2.注释3接...
分类:
其他好文 时间:
2014-05-03 22:48:35
阅读次数:
401
//非递归遍历一棵树 需要借助栈
#include
#include
struct Tree
{
int nValue;
Tree *pLeft;
Tree *pRight;
};
struct Stack
{
Tree *root;
Stack *pNext;
};
Stack *pStack = NULL;
void push(Tree *root)
{
St...
分类:
其他好文 时间:
2014-05-03 20:55:41
阅读次数:
325
#include
#include
#include
#include
#include
using namespace std;
#define N 20020
struct node{
int from, to, dou, nex;
}edge[N];
int head[N], edgenum;
void add(int u, int v,int dou){
node E={u,v,dou...
分类:
其他好文 时间:
2014-05-03 15:25:32
阅读次数:
340