文章分类 - C/C++
[转载]联合和结构体的内存分配大小
摘要:http://hi.baidu.com/Ã×À¼»ê_swust/blog/item/3f79de222acd9743ad34dea3.html#include "iostream"using namespace std;union U {struct X { int s1; int s2; int s3;} x;unsigned int c;} u;struct S{char a;int b;double c;}s; void main(){cout << "union's size
阅读全文
[转载]C++强大背后
摘要:http://www.cnblogs.com/miloyip/archive/2010/09/17/behind_cplusplus.html在31年前(1979年),一名刚获得博士学位的研究员,为了开发一个软件项目发明了一门新编程语言,该研究员名为Bjarne Stroustrup,该门语言则命名为——C with classes,四年后改称为C++。C++是一门通用编程语言,支持多种编程范式,包括过程式、面向对象(object-oriented programming, OP)、泛型(generic programming, GP),后来为泛型而设计的模版,被发现及证明是图灵完备的,因此使
阅读全文