#ifndef SWAP_H_INCLUDED#define
SWAP_H_INCLUDED#include using namespace std;struct Job{ string name; int
salary;};template void Swap(T &a, T &b);...
分类:
其他好文 时间:
2014-05-16 01:14:38
阅读次数:
340
Memory management1.listvmastatic void
mtest_dump_vma_list(void){ struct task_struct *task = current; //get the
task_struct of the current process stru...
分类:
系统相关 时间:
2014-05-15 22:29:30
阅读次数:
555
mongoose是一款非常容易使用的web服务器,实现了对socket的封装,它提供给我们的接口非常简洁,并且能提供很好的性能。
几个重要的结构:
struct mg_context
服务器上下文,保存着服务器的配置信息。每个mg_context都代表一个服务器。
struct mg_connection
表示HTTP的连接
st...
分类:
其他好文 时间:
2014-05-15 20:10:07
阅读次数:
364
//#define
LOCAL#include#include#include#includeint const MAX_N=1001;typedef struct Point{
double x,y; bool operatorVec[i].y) { ...
分类:
其他好文 时间:
2014-05-15 13:51:08
阅读次数:
230
void GregorianDay(struct rtc_time * tm){ int
leapsToDate; int lastYear; int day; int MonthOffset[] = {
0,31,59,90,120,151,181,212,243,273,304,334 }; l...
分类:
其他好文 时间:
2014-05-15 11:38:36
阅读次数:
488
NSArray、NSSet、NSDictionary 集合类
可以用来装东西OC数组只能存放OC对象、不能存放非OC对象类型,如int、struct\enu等OC数组不能存放nil值1.NSArray 不可变数组1》.
NSArray *array1 = [NSArray array]; // 由....
分类:
其他好文 时间:
2014-05-15 10:23:07
阅读次数:
253
tarjan算法第一题
喷我一脸。。。。把手写栈的类型开成了BOOL,一直在找错。。。
#include
#include
#include
#include
#define maxn 100005
const int MOD=1000000007;
using namespace std;
struct node
{
int to,next;
}edge[maxn...
分类:
其他好文 时间:
2014-05-15 08:18:56
阅读次数:
353
//***************************************************************
//结构体:简单的静态链表
#include
#include
#define NULL 0
#define SIZE 10
struct student
{
char num[SIZE];
float score;
struct student *next;
...
分类:
编程语言 时间:
2014-05-15 02:55:09
阅读次数:
359
//Processing date
struct tm time;
std::string date;
char dateBuff[128] = {0};
time.tm_year = atoi(md_date.getString().substr(0,4).c_str()) - 1900;
time.tm_mon = atoi(md_date.getString().subs...
分类:
其他好文 时间:
2014-05-14 21:52:15
阅读次数:
248
1. 结构的基础知识
跟数组一样是成员的集合,但与数组有很大的区别,结构的元素不能通过下标法来访问,因为各个成员的大小可能不同,但是数组可以,因为数组元素保持一致。
1.1 结构声明
struct tag {member-list }
variable-list ;
上面黑色部分是可选部分,但是必须同时出现两个。
实例一:下面是实例:
struct{
i...
分类:
编程语言 时间:
2014-05-14 21:47:06
阅读次数:
522