摘要: //数组地址以及作为函数传递带来的问题#include "stdafx.h"#include <iostream>using namespace std;void test(int a[5]);void test2(int a[5]);int _tmain(int argc, _TCHAR* argv[]){ int a[5]={1,2,3,4,5}; cout<<"sizeof a is: "<... 阅读全文
posted @ 2012-05-07 21:28 ForFreeDom 阅读(3064) 评论(0) 推荐(2) 编辑
摘要: 1.一些成员函数改变对象,一些成员函数不改变对象. 2.为了使成员函数的意义更加清楚,我们可在不改变对象的成员函数的函数原型中加上const说明: class Point { public: int GetX() const; int GetY() const; void SetPt (int, int); void OffsetPt (int, int); priva... 阅读全文
posted @ 2012-05-07 18:00 ForFreeDom 阅读(564) 评论(0) 推荐(1) 编辑