//for 反汇编#includeint main(){ int i=0; int s=0;
for(i=10;i=1;i--) { s=s+1; } return 0;}//for 反汇编#includeint
main(){000000013F1...
分类:
其他好文 时间:
2014-05-23 12:41:04
阅读次数:
434
题目链接题意:给出单链表头指针,要求交换链表中每一对相邻的结点.注意:不可以改变链表中结点的值,只可以使用常量空间.附上代码:
1 /** 2 * Definition for singly-linked list. 3 * struct ListNode { 4 * int
val;...
分类:
其他好文 时间:
2014-05-23 10:43:49
阅读次数:
249
#include
void main(){
const int count = 5;//定义数量
struct student{
char name[80];
float math,eng;
float aver;
}stu[count],temp;
//输入
for (int i = 0; i
scanf("%s%f%f", stu[i].name, &stu[i].m...
分类:
编程语言 时间:
2014-05-22 11:21:15
阅读次数:
312
题目:给出一个连续的链表,要求你将其结构改变反转。
例如:
输入:1 2 3 4 5
输出:5 4 3 2 1
#include
#include
#include
typedef struct ListNode{
int m_pKey;
ListNode * m_pNext;
};
ListNode *ListReverse(ListNode *pHea...
分类:
其他好文 时间:
2014-05-22 08:16:58
阅读次数:
210
#include
#include
#include
#include
#include
using namespace std;
struct Library
{
long number;//编号
string bookname;//书名
string author;//作者
string press;//出版社
int price;//价格
}...
分类:
其他好文 时间:
2014-05-22 07:17:38
阅读次数:
206
OK,继续上篇的内容. 配置好外部中断源以后, 就得使能外部中断线了.
为了方便看再借下这个图:
对外部中断的使能其实就是配置上面这些寄存器.即使能哪EXIT线,选择上面模式,是中断还是事件,选择下降沿还是上升沿.
具体怎么写寄存器这就不研究了, = = 太麻烦了.. 直接用STM32的库就行了,来看看它的代码吧
这是EXTI结构体的初始化函数,
void EXTI_Struct...
分类:
其他好文 时间:
2014-05-22 06:43:16
阅读次数:
395
struct dx_rootHtree的内部节点:struct
dx_nodeHtree树根和节点中都存在的Hash map:struct
dx_entry1.20扩展属性EA扩展属性(xattrs)通常存储在磁盘上的一个单独的数据块中,通过inode.i_file_acl*引用。扩展属性的第一应用...
分类:
其他好文 时间:
2014-05-20 11:07:57
阅读次数:
675
题目:从上往下打印出二叉树的每个节点,同一层的节点按照从左到右的顺序打印。分析:其实就是按层的遍历方式#include #include using
namespace std;struct BinaryTree{ int data; BinaryTree* lchild; Bin...
分类:
其他好文 时间:
2014-05-20 10:13:47
阅读次数:
242
对齐规律:占用最大成员类型的整数倍,每个成员的对齐地址为该成员类型的整数倍struct{
int a; 0-3char b;4-5 int
c;8-11}:12含位域:使用位域的主要目的是压缩存储,其大致规则为:1)如果相邻位域字段的类型相同,且其位宽之和小于类型的sizeof大小,则后面的字段将....
分类:
其他好文 时间:
2014-05-19 14:15:02
阅读次数:
204
出题:输入一个单向链表,要求输出链表中倒数第K个节点分析:利用等差指针,指针A先行K步,然后指针B从链表头与A同步前进,当A到达链表尾时B指向的节点就是倒数第K个节点;解题:
1 struct Node { 2 int v; 3 Node *next; 4 }; 5 ...
分类:
其他好文 时间:
2014-05-19 12:07:16
阅读次数:
376