Swift 初见本页内容包括:简单值(Simple Values)控制流(Control Flow)函数和闭包(Functions and Closures)对象和类(Objects and Classes)枚举和结构体(Enumerations and Structures)协议和扩展(Proto...
分类:
编程语言 时间:
2014-09-20 01:02:16
阅读次数:
348
TScrollInfo 结构体。在Delphi中定义在windows单元下。定义如下: tagSCROLLINFO = packed record cbSize: UINT; //结构体大小,在使用时首先要初始化 SizeOf(ScrollInfo) fMask: UIN...
分类:
其他好文 时间:
2014-09-19 23:44:36
阅读次数:
308
本博文主要介绍IO流中fstream,iterator的简单应用。问题描述:a):找一篇文章(The Bble Holy) ,将其所有的单词输入vector中,并统计其单词个数b):增加统计词频功能,用结构体实现(word ,count) ,将结构体存入vector中c):增加体用词功能。 1):....
分类:
编程语言 时间:
2014-09-19 23:40:46
阅读次数:
372
1.结构体对齐问题32位机器例子1:结果:例子2:struct A{ char c1; int i; short s; int j;}a;struct B{ int i; int j; short s; char c1;}b;结构A没有遵守字节对齐原则(为了区分,我将它叫做对齐声明原则),结构B遵守...
分类:
其他好文 时间:
2014-09-19 20:53:15
阅读次数:
212
【程序设计】C与C++中空结构体与空类的大小...
分类:
编程语言 时间:
2014-09-19 12:12:45
阅读次数:
200
本来想用 priority_queue 去写个bfs。结果重载运算符忘了。ORZ。
然后看书和问别人熟悉了一下,记录一下。
struct lx
{
int x,y,lv;
};
有一个这样的结构体。x,y,是坐标,lv 是它的权。重载
struct lx
{
int x,y,lv;
friend bool operator<(lx a,lx b)
...
分类:
编程语言 时间:
2014-09-19 12:01:05
阅读次数:
236
tengine.taobao.org/book/chapter_03.html程序解析:1,核心是定义三个结构体,分别是a,ngx_command_t(模块的配置结构):由于定义了自己的配置结构体typedef struct{ngx_str_t hello_string;ngx_int_t hell...
分类:
其他好文 时间:
2014-09-19 11:39:55
阅读次数:
304
这道练习题训练了:
1.结构体数组
2.二分查找
3.指针操作
----
都不难,但很基础,我觉得很好,做完了记到博客上来,题目见k&R,实现如下:
/*
* Practice of struct array. K&R 6-1
* @author : wusuopubupt
* @date : 2014-09-18
*/
#include
#include
#incl...
分类:
其他好文 时间:
2014-09-18 23:49:24
阅读次数:
292
1004. 成绩排名 (20) (ZJUPAT 结构体)...
分类:
其他好文 时间:
2014-09-18 20:44:44
阅读次数:
160
这些是在CGGeometry.h里的 CGPoint、CGSize、CGRect、CGRectEdge实际上都是结构体struct CGPoint { CGFloat x; CGFloat y;};typedef struct CGPoint CGPoint;struct CGSize { CGFl...
分类:
其他好文 时间:
2014-09-18 13:07:15
阅读次数:
243