编程语言
#include struct Person { char *name; };void change1(struct Person p);void change2(struct Person *p);int main(){ /*************************************...
分类:编程语言 时间:2014-01-23 20:15:41 收藏:0 阅读:396
C篇1.1 指针指针是一个占四字节的变量,与其他变量的不同就在于它的值是一个内存地址,指向内存的另一个地方。C语言适合底层开发就在于支持指针,能够直接访问内存地址和操作底层的数据,可以通过指针动态分配和释放内存。 1: typedef struct _node{2: int value;3: str...
分类:编程语言 时间:2014-01-23 20:12:41 收藏:0 阅读:417
Python看下面一个简单类:>>> class MyClass(object):... """... this is a class with a doc string... """... pass...>>> print MyClass.__doc__ this is a class with ...
分类:编程语言 时间:2014-01-23 20:00:41 收藏:0 阅读:450
#include int main(){ /*************************************************** *定义结构体变量的3种方式 * 1、先定义类型,再定义变量(分开定义) * struct Student * { * int age; * }; * s...
分类:编程语言 时间:2014-01-23 19:49:41 收藏:0 阅读:482
#include int main(){ /*************************************************** * * 结构体内存分析(注意结构体里面定义成员结束后要使用分号): * struct Date * { * int year; * int month;...
分类:编程语言 时间:2014-01-23 19:48:41 收藏:0 阅读:464
#include int main(){ /*************************************************** *结构体数组:数组的每个元素都是结构体类型,注意是同一种结构体类型 * * struct RankRecord * { * int no; * int ...
分类:编程语言 时间:2014-01-23 19:07:41 收藏:0 阅读:359
#include int main(){ /*************************************************** *结构体指针:指向结构体的指针 * * struct Student * { * char *name; * }; * 1.指向结构体的指针的定义 * ...
分类:编程语言 时间:2014-01-23 19:03:41 收藏:0 阅读:420
中提到的临时变量:见10.4.10节其中有这样一个例子:void f(string& s1,string& s2,string& s3){ const char* cs = (s1+s2).c_str(); cout<<cs; if( strlen(cs=(s2+s3).c_str())<8 && ...
分类:编程语言 时间:2014-01-23 18:23:40 收藏:0 阅读:457
#include int main(){ /*************************************************** * * 数组:由多个相同类型的数据构成 * 结构体:可以由多个不同类型的数据构成 * * 结构体的使用: * 1、定义结构体类型 * struct Pe...
分类:编程语言 时间:2014-01-23 17:17:52 收藏:0 阅读:382
问题聚焦: 上一条款所告诉我们的智能指针,只适合与在堆中的资源,而并非所有资源都是在堆中的。 这时候,我们可能需要建立自己的资源管理类,那么建立自己的资源管理类时,需要注意什么呢?...
分类:编程语言 时间:2014-01-23 10:02:51 收藏:0 阅读:429
151242512435124451284
上一页512833下一页
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!