摘要:
MemB.h的代码: MemB.cpp的代码: MyString的代码和main函数: strcpy遇到的不安全问题可以通过这个来解决: http://jingyan.baidu.com/article/ce436649fd61543773afd32e.html 1. char *strcpy(ch 阅读全文
摘要:
#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... 阅读全文
摘要:
#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... 阅读全文
摘要:
下面是MyStack.h的代码: 下面是MyStack.cpp的内容: 下面是main函数的代码: 阅读全文
摘要:
#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... 阅读全文