- 博客(4)
- 收藏
- 关注
转载 函数名前加 & 符号的深入理解 C++
#include <iostream> using namespace std; int& test_str() { int a = 1; return a; //通过返回 a 的地址来进行 值的返回(即 a的地址中所储存的值) } int ff(int t) //返回的就是个数 a 的值,a属于局部变量,函数...
2018-12-05 17:24:00
3333
转载 C++常量(const)的使用
#include <iostream> using namespace std; class MyClass { public: int GetValue() const ; int GetValue() { return x + y; } int GetMax() { ...
2018-11-26 21:34:00
123
转载 C++拷贝构造函数 的理解
#include <iostream> using namespace std; //拷贝构造函数的理解 class Point { public: Point(); Point(int X, int Y); ~Point(); Point(Point &p); void setPoint(int X...
2018-11-25 18:41:00
124
转载 //指针的进一步理解
#include "stdio.h" #include "stdlib.h" #define SIZE 4 struct student { int num; struct student *next; }stu[SIZE]; main() { struct student *h=NULL,*q,*tail; int i=0;...
2018-06-29 10:20:00
115
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人