码迷,mamicode.com
首页 >  
搜索关键字:struct    ( 18973个结果
经典的MySQL 数据备份校验daemon程序
#vim:tabstop=4shiftwidth=4softtabstop=4 #Copyright2010UnitedStatesGovernmentasrepresentedbythe #AdministratoroftheNationalAeronauticsandSpaceAdministration. #Copyright2011JustinSantaBarbara #AllRightsReserved. #Copyright(c)2010CitrixSystems,Inc. # #Licensed..
分类:数据库   时间:2014-05-27 04:03:25    阅读次数:626
Android-NDK处理用户交互事件
在 android_main(struct android_app* state)函数里面设置输入事件处理函数:state->onInputEvent = &handleInput;//设置输入事件的处理函数,如触摸响应函数介绍:AMotionEvent_getX():以屏幕左上角为原点,是绝对坐标...
分类:移动开发   时间:2014-05-23 09:29:18    阅读次数:585
linux 中 C 语言的使用 -- 结构体多态
在 Linux 内核代码,特别是驱动代码中经常见到的用法是使用一个标准结构,后面的代码基于这个结构来实现,类似面向对象的多态特性。 在 C 语言里面借助结构体和函数指针实现的这个功能,这里我们写了个例子,提取了关键代码:    #include struct s_new{ char name[10]; char* (* my_method)(char *name);...
分类:系统相关   时间:2014-05-23 07:58:18    阅读次数:324
湖南省第九届大学生程序设计竞赛
Interesting Calculator CSU 过了 TOJ超时了 先记一下 #include #include #include using namespace std; int a[100]; bool b[100010]; int c[100010]; int d[100010]; int x, y; int cas = 1; struct node { int x, t,...
分类:其他好文   时间:2014-05-22 12:42:02    阅读次数:249
C经典之12-用链表存1-10的数字---ShinePans
#include #include #include //system(); 这个指令需要用到此头文件 #include //toupper要用到 #include //在内存管理时用到的头文件 void main() { int i; struct ListEntry { int number; struct ListEntry *next; } start, ...
分类:其他好文   时间:2014-05-22 10:51:06    阅读次数:204
leetcode:Insert Sort List
问题描述 对一个单链表进行插入排序,head指向第一个结点。 代码 /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */...
分类:其他好文   时间:2014-05-22 10:15:43    阅读次数:233
结构体
结构的定义定义一个结构的一般形式为:struct结构名{成员表列}例如:struct stu{int num;char name[20];int age;}结构类型变量的说明结构体定义并不是定义一个变量,而是定义了一种数据类型,这种类型是你定义的,它可以和语言本身所自有的简单数据类型一样使用(如in...
分类:其他好文   时间:2014-05-22 05:36:40    阅读次数:172
笔试算法题(13):反转链表 & 左旋转字符串
出题:反转链表(递归和非递归解法);分析:有递归跟非递归实现,注意对原始链表头节点的处理,因为其他节点都指向下一个节点,其需要指向NULL;解题: 1 struct Node { 2 int v; 3 Node *next; 4 }; 5 Node* NonRecur...
分类:其他好文   时间:2014-05-22 05:20:04    阅读次数:310
Linus Torvalds 指针
《对话LinusTorvalds:大多黑客甚至连指针都未理解》http://www.csdn.net/article/2013-01-10/2813559-two-star-programming“不懂指针”的开发者代码示例: 1 typedef struct node 2 { 3 ...
分类:其他好文   时间:2014-05-22 04:40:17    阅读次数:245
复数运算
#include #include using namespace std; struct node   { int shi; int xu; int data; }; int main() {     int shinum=0;     int xunum=0;     int n;     cin>>n;     node*num=ne...
分类:其他好文   时间:2014-05-20 15:28:05    阅读次数:256
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!