2016年3月24日
摘要: MemB.h的代码: MemB.cpp的代码: MyString的代码和main函数: strcpy遇到的不安全问题可以通过这个来解决: http://jingyan.baidu.com/article/ce436649fd61543773afd32e.html 1. char *strcpy(ch 阅读全文
posted @ 2016-03-24 22:16 各种笔记 阅读(271) 评论(0) 推荐(0) 编辑
摘要: #include "stdafx.h" #include #include using namespace std; const int sz=20; struct Holder{ private: int a[sz]; public: void initialize(); struct Pointer; friend Pointer; struc... 阅读全文
posted @ 2016-03-24 14:20 各种笔记 阅读(202) 评论(0) 推荐(0) 编辑
摘要: #include "stdafx.h" #include using namespace std; //A里面有个private的变量,需要被其他的如 //全局函数g(A *a)、h()、结构体C、结构体中的某个函数B::f(A *a)访问 struct A; struct B{ void f(A *a); //这里用到了A,那么前面必须前面有A的声明 }; st... 阅读全文
posted @ 2016-03-24 13:35 各种笔记 阅读(233) 评论(0) 推荐(0) 编辑
摘要: 下面是MyStack.h的代码: 下面是MyStack.cpp的内容: 下面是main函数的代码: 阅读全文
posted @ 2016-03-24 10:12 各种笔记 阅读(457) 评论(0) 推荐(0) 编辑
摘要: #include "stdafx.h" #include using namespace std; struct A{ int i[100]; }; struct B{ void f(); }; void B::f(){ } struct C{ }; int _tmain(int argc, _TCHAR* argv[]) { cout<<size... 阅读全文
posted @ 2016-03-24 08:38 各种笔记 阅读(190) 评论(0) 推荐(0) 编辑