单词计算程序,为啥遍历输出的时候会出现段错误 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
定义LCD相应寄存器的结构体struct lcd_regs { unsigned long lcdcon1; unsigned long lcdcon2; unsigned long lcdcon3; unsigned long lcd...
分类:
其他好文 时间:
2014-07-01 19:12:25
阅读次数:
204
根据朋友给的一份原理写的 感觉还挺清楚#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# 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
题目大意:
问[s,e]之间有多少个 斐波那契数。
思路分析:
直接模拟高精度字符串的加法和大小的比较。
注意wa点再 s 可以从 0 开始
那么要在判断输入结束的时候注意一下。
#include
#include
#include
#include
using namespace std;
struct node
{
char str[111];
...
分类:
其他好文 时间:
2014-07-01 16:08:10
阅读次数:
243
题目链接:点击打开链接
#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
链表节点定义如下:1 typedef struct ListNode2 {3 int value;4 ListNode *next;5 }TListNode;众所周知,链表打印时从头到尾很简单,所以我们首先想到的可能是先把链表逆序,然后从头到尾再打印出来即可,但是逆序会破坏链表的结构...
分类:
其他好文 时间:
2014-07-01 11:54:59
阅读次数:
168
分三块来讲述: 1 首先://注意在C和C++里不同 在C中定义一个结构体类型要用typedef: typedef struct Student { int a; }Stu; 于是在声明变量的时候就可:Stu stu1;(如果没有typedef就必须用struc...
分类:
其他好文 时间:
2014-07-01 10:32:38
阅读次数:
132
下面这个散列表的实现来自K&R,很经典。在其他场景中遇到的实现更复杂,基本原理不变,只是在hash算法,或者在快速查询上做了优化。
#include
#include
//具有相同hash值构成的链表
struct nlist{
struct nlist
* next;
char * name; //key-定义的名字
char ...
分类:
其他好文 时间:
2014-07-01 07:42:51
阅读次数:
158