之前用GUI+的时候一直都是用的#include #pragma comment(lib,
"gdiplus.lib")using namespace
Gdiplus;但是偶发现当多个文件包含的时候,会报很多错误~~1>f:\vs2013\vc\include\gdiplusenums.h(29)....
分类:
其他好文 时间:
2014-05-11 16:28:06
阅读次数:
730
#pragma pack (n) /*指定按n字节对齐*/ 不写这句默认n =8
设真正的对齐长度为m字节
如果n>结构体中数据类型(包括类类型)长度最大的数据类型长度,m = 结构体中最大数据类型长度
否则 m = n
总之,真正的对齐长度m为指定对齐长度n与结构体中最大类型长度中的较小值。
规则:
1. 结构体变量的首地址能够被m所整除;
2. 结构体每个...
分类:
其他好文 时间:
2014-05-11 13:32:36
阅读次数:
299
tableView 实现的方法 无分组的cell
#pragma mark - Table view data source
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
return self.contacts.count;
}
- (UITable...
分类:
移动开发 时间:
2014-05-09 21:03:32
阅读次数:
424
类型修饰符const不仅可以说明成员函数,也可是说明数据成员由于const类型对象必须被初始化,并且不能更新,因此,子啊类中说明了const数据成员时,只能通过成员初始化列表的方式来生成构造函数对数据成员的初始化。//A.h#pragma
onceclass A{public: A(int i...
分类:
其他好文 时间:
2014-05-09 13:00:00
阅读次数:
254
HDU 4578
线段树区间更新
操作有:
区间所有数add(c)
区间所有数mul(c)
区间所有数set(c)
查询有:
区间所有数的p次方和(p>= 1 && p
关键是区间更新的三种操作的优先级的确定清楚
关键是:down和update中对区间的更新操作是一回事,可以写成函数方便编程
//#pragma warning (disable: 47...
分类:
其他好文 时间:
2014-05-09 01:08:38
阅读次数:
432
饮料->牛->食物。牛拆成两点。//#pragma comment(linker,
"/STACK:1024000000,1024000000")#include#include#include#include#include#include#include#include#include#incl...
分类:
其他好文 时间:
2014-05-08 14:26:15
阅读次数:
423
每个门每个时间只能出一个人,那就把每个门拆成多个,对应每个时间。不断增加时间,然后增广,直到最大匹配。//#pragma comment(linker,
"/STACK:1024000000,1024000000")#include#include#include#include#include#i...
分类:
其他好文 时间:
2014-05-08 14:24:17
阅读次数:
721
划分成两个集合使费用最小,可以转成最小割,既最大流。//#pragma
comment(linker,
"/STACK:1024000000,1024000000")#include#include#include#include#include#include#include#include#in...
分类:
其他好文 时间:
2014-05-08 14:23:18
阅读次数:
281
两条路不能有重边,既每条边的容量是1。求流量为2的最小费用即可。//#pragma
comment(linker,
"/STACK:1024000000,1024000000")#include#include#include#include#include#include#include#incl...
分类:
其他好文 时间:
2014-05-08 14:18:59
阅读次数:
278
网上很多关于QT中文乱码的问题及答案,但情况不同解决方法也不一样。本方案适用于VS2013+QT5.3环境(编译器是VC)using namespace
std;# pragma execution_character_set("utf-8")//文件的开头要声明字符编码UTF-8,这样输出中文字符...
分类:
其他好文 时间:
2014-05-08 00:40:33
阅读次数:
383