摘要: 主要讲述类的对象的构造过程,析构过程.1.data.h主要进行简单的声明#include "stdio.h"#include "iostream.h"#include <string>#if !defined(AFX_123)class CStudent{private:char* age;char* name;public:char* GetName() const;void SetName(char*);void display(void);CStudent(int,char*);CStudent(const CStudent&) 阅读全文
posted @ 2013-01-03 11:53 血洗女生宿舍 阅读(188) 评论(0) 推荐(0) 编辑
只有注册用户登录后才能阅读该文。 阅读全文
posted @ 2013-01-03 09:51 血洗女生宿舍 阅读(4) 评论(0) 推荐(0) 编辑
摘要: 有了基本数据类型之后,还不够用,这是需要对基本数据进行扩展,于是就有了数组和复合数据类型.1.先在h中定义数据//data.h文件#include "stdio.h"#include "iostream.h"#include <string>#if !defined(AFX_123)int apple[100];struct Student{int age;int height;int weight;};#define AFX_123#endif2. 在cpp中进行演示#include "data.h"void main( 阅读全文
posted @ 2013-01-03 07:50 血洗女生宿舍 阅读(127) 评论(0) 推荐(0) 编辑
摘要: 本文主要讲述C++基本数据类型,如何引用这些基本数据类型.1.在data.h中声明//data.h文件#include "stdio.h"#include <string>#in !undefined(AFX_123)int age;short height;long distance;float weight;double area;char c;char* p;char radio[10]={"hello C++"};bool result;#define AFX_123#endif2. 在data.cpp中定义和引用#include & 阅读全文
posted @ 2013-01-03 07:30 血洗女生宿舍 阅读(102) 评论(0) 推荐(0) 编辑