//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,原因是C++要求每个实例在内存中都有独一无二的地址。(一)类内部的成员变量:普通的变量:是要占用内存的,但是要注意对齐原则(这点和struct类型很相似)。static修饰的静态变量:不占用内容,原因是编译器将其放在全局变量区。(二)类内部的成员函数:普通函数...
分类:
编程语言 时间:
2014-05-19 17:23:13
阅读次数:
270
//#define LOCAL#include#include#include#includeint
const MAX_N=101;typedef struct Point{ int x,y; bool operatorVec[i].y) { ...
分类:
其他好文 时间:
2014-05-19 17:08:45
阅读次数:
253
最近写代码,无意中发现了一个坑,关于自定义比较函数的stl
sort函数的坑,于是记录下来。先贴代码: 1 #include 2 #include 3 #include 4 5 struct finder 6 { 7
bool operator()(int first, in...
分类:
其他好文 时间:
2014-05-19 14:47:48
阅读次数:
319
对齐规律:占用最大成员类型的整数倍,每个成员的对齐地址为该成员类型的整数倍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
个人觉得ST的库函数用起来还是挺不错的,之前都是使用自己写的函数,容易改出错,以下是验证过的,TIM1定时100微妙中断一次。
void TIM1_TimeBaseInit(u16 TIM1_Prescaler,
TIM1_CounterMode_TypeDef TIM1_CounterMode,...
分类:
其他好文 时间:
2014-05-18 13:27:43
阅读次数:
306
#ifndef __APP_WEBSOCKET_FRAME_H__
#define __APP_WEBSOCKET_FRAME_H__
#include "memory.hpp"
class buffer;
struct websocket_frame
{
websocket_frame();
~websocket_frame();
static const unsigned int f...
分类:
Web程序 时间:
2014-05-18 09:37:29
阅读次数:
332
1001
1002
1003
这题错了半天 伤不起 转成字符串搞字典树就错 最后直接位运算&建树就对了
AC代码
#include
#include
typedef __int64 LL;
const int maxn = 100010;
const int maxnode = 60000000;
const int sigma_size = 2;
LL a[maxn];
char...
分类:
其他好文 时间:
2014-05-18 04:47:04
阅读次数:
310
class、interface、struct的区别...
分类:
其他好文 时间:
2014-05-18 04:04:55
阅读次数:
367