C++
boz
朝闻道,夕死可矣!
展开
-
Essential C++
Chapter 1. Basic C++ ProgrammingIn this chapter, we evolve a small program to exercise the fundamental components of the C++ language.These components consist of the following:1. A small set of data t原创 2010-01-13 21:54:00 · 669 阅读 · 0 评论 -
一个类和结构的例子
#includeusing namespace std;typedef struct struct_test{ int x; int y; int z;}stest;class testX{private: int _x; int原创 2011-08-04 21:25:44 · 459 阅读 · 0 评论 -
动态数组(栈)的实现实例
#include #include using namespace std;const int initStack = 1;class Istack{public: Istack(); ~Istack(); void push(int i)原创 2011-08-08 14:29:53 · 557 阅读 · 0 评论 -
最近在读的书
最近在读的书: 深度探索 C++对象模型 c++捷径教程 c++primer 题解原创 2011-08-05 10:06:09 · 460 阅读 · 1 评论 -
内存越界访问的一些看法
1. 原理分析 经常有些新C++程序员问:C++的类的成员个数是不是有限制,为什么我加一个变量后程序就死了?或者说:是不是成员变量的顺序很重要,为什么我两个成员变量顺序换一换程序就不行了?凡此种种之怪现象,往往都是内存访问越界所致。何谓内存访问越界,简单的说,你向系统申请了一块内存,在使用这块内存的时候,超出了你申请的范围。例如,你明明申请的是100字节的空间,但是你由于某种原因写入转载 2014-11-13 23:10:07 · 709 阅读 · 0 评论