![](https://img-blog.csdnimg.cn/20201014180756926.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
C++
马踏飞燕ll
静 净 竞
展开
-
代码详解c++类作用域
/* 代码详解c++ 类作用域的相关知识 */ #include <iostream> #include <string> using namespace std; void doA() { int a; a=12; } void doB() { int b; b=99; } class First { publi...原创 2019-03-08 18:35:08 · 235 阅读 · 0 评论 -
c++静态static
#include<iostream> #include<string> /* 尽量使用static static 函数不能使用This 指针 */ using namespace std; //全局变量保存 //double interestRate; class Dog { }; class Account { public: Account(...原创 2019-03-13 22:25:12 · 148 阅读 · 0 评论 -
代码详解c++构造函数
/* 代码详解构造函数 */ #include <iostream> #include<string> using namespace std; class Person { public: Person (const std::string &nm) :name(nm),age(22) { } public: std::stri...原创 2019-03-09 14:41:59 · 370 阅读 · 0 评论 -
代码详解c++ 三种友元函数
#include<iostream> #include<string> using namespace std; class Screen; class Dog { public: int foo(Screen & screen); }; class Screen { public: friend int calcArea(Screen...原创 2019-03-11 22:56:35 · 340 阅读 · 0 评论