摘要:
#include <iostream> #include <string> namespace { class A { public: void addCount() { ++sumCount; } static int getSumCount() { return sumCount; } priv 阅读全文
posted @ 2024-07-19 19:49
double64
阅读(17)
评论(0)
推荐(0)
摘要:
#include <iostream> #include <string> namespace { class A { public: const A& get_self() const { std::cout << "常量版本" << std::endl; return *this; } A& g 阅读全文
posted @ 2024-07-19 14:46
double64
阅读(11)
评论(0)
推荐(0)
摘要:
C++ class 和 struct 可以相互继承吗? #include <iostream> #include <string> namespace { class A { public: std::string name = "小明"; }; struct B :public A { int a 阅读全文
posted @ 2024-07-19 11:30
double64
阅读(72)
评论(0)
推荐(0)
浙公网安备 33010602011771号