码迷,mamicode.com
首页 >  
搜索关键字:struct enum    ( 22969个结果
单词计数
单词计算程序,为啥遍历输出的时候会出现段错误 1 #include 2 #include 3 #include 4 #include 5 6 #define MAXWORD 100 7 8 struct tnode{ 9 char *word; 10 int c...
分类:其他好文   时间:2014-07-03 09:26:20    阅读次数:201
触摸屏驱动程序
触摸屏驱动程序框架与上一片文章的输入子系统类似,只是底层驱动由按键变成了触摸屏。S3C2440的ADC相关寄存器:struct s3c_ts_regs { unsigned long adccon; unsigned long adctsc; unsigned long adcdly; un...
分类:其他好文   时间:2014-07-02 21:54:57    阅读次数:285
enum 在c中的使用
假设一个变量你须要几种可能存在的值,那么就能够被定义成为枚举类型。之所以叫枚举就是说将变量或者叫对象可能存在的情况也能够说是可能的值一一例举出来。 举个样例来说明一吧,为了让大家更明确一点,比方一个铅笔盒中有一支笔,但在没有打开之前你并不知道它是什么笔,可能是铅笔也可能是钢笔,这里有两种可能,那么....
分类:其他好文   时间:2014-07-02 21:50:18    阅读次数:198
Leetcode:Sort List 对单链表归并排序
Sort a linked list in O(n log n) time using constant space complexity. 看到O(n log n)的排序算法,适合单链表的首先想到的就是归并排序 /** * Definition for singly-linked list. * struct ListNode { * int val; * Lis...
分类:其他好文   时间:2014-07-02 08:47:34    阅读次数:239
LCD驱动程序
定义LCD相应寄存器的结构体struct lcd_regs { unsigned long lcdcon1; unsigned long lcdcon2; unsigned long lcdcon3; unsigned long lcd...
分类:其他好文   时间:2014-07-01 19:12:25    阅读次数:204
【CCL】连通区域提取
根据朋友给的一份原理写的 感觉还挺清楚#include "cv.h"#include "highgui.h"#include using namespace cv;#define MAXWIDTH 352#define MAXHEIGHT 288typedef struct PTNode{ ...
分类:其他好文   时间:2014-07-01 18:41:35    阅读次数:145
structDemo1
structDemo1# include # include enum EType{ One = 1,Tow,Three };struct S1{ int id ; char name [111]; long version ;};int main(void){ ET...
分类:其他好文   时间:2014-07-01 17:16:06    阅读次数:151
hdu 1316 How Many Fibs? (模拟高精度)
题目大意: 问[s,e]之间有多少个 斐波那契数。 思路分析: 直接模拟高精度字符串的加法和大小的比较。 注意wa点再 s 可以从 0 开始 那么要在判断输入结束的时候注意一下。 #include #include #include #include using namespace std; struct node { char str[111]; ...
分类:其他好文   时间:2014-07-01 16:08:10    阅读次数:243
CodeForces 23C Oranges and Apples 抽屉原理
题目链接:点击打开链接 #include #include #include #include #include #include #include #include using namespace std; #define inf 10000000 #define ll __int64 #define N 200005 ll n, m, v; struct node{...
分类:移动开发   时间:2014-07-01 15:52:00    阅读次数:298
【转载】struct和typedef struct彻底明白了
分三块来讲述: 1 首先://注意在C和C++里不同 在C中定义一个结构体类型要用typedef: typedef struct Student { int a; }Stu; 于是在声明变量的时候就可:Stu stu1;(如果没有typedef就必须用struc...
分类:其他好文   时间:2014-07-01 10:32:38    阅读次数:132
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!