上一页 1 ··· 9 10 11 12 13 14 15 16 17 ··· 56 下一页
摘要: #define _CRT_SECURE_NO_WARNINGS /*多字节转宽字节*/ int unsafe_mbstowcs() { // 设置当前的 locale 为用户环境变量指定的 locale setlocale(LC_ALL, ""); // 定义多字节字符串 const char* m 阅读全文
posted @ 2024-09-02 20:38 double64 阅读(93) 评论(0) 推荐(0)
摘要: class Dog { public: class Animal { public: Animal(Dog* dog) { m_Dog = dog; m_Age = 1; m_Name = dog->m_Info; // 可以访问宿主类对象 } string m_Name; int getAge() 阅读全文
posted @ 2024-08-30 21:08 double64 阅读(16) 评论(0) 推荐(0)
摘要: class Dog { public: Dog() { m_Name = "小狗狗"; m_Info = "田园狗"; m_Test = "测试"; } void showTest() { cout << "Test:" << m_Test << endl; } void showGood() { 阅读全文
posted @ 2024-08-30 20:52 double64 阅读(21) 评论(0) 推荐(0)
摘要: #include <string> #include <mutex> #include <iostream> using namespace std; namespace { //std::mutex m; std::recursive_mutex m; // 可递归 class Test { pu 阅读全文
posted @ 2024-08-24 15:28 double64 阅读(44) 评论(0) 推荐(0)
摘要: #include <string> #include <iostream> using namespace std; namespace { class Animal { public: Animal() { cout << "基类调用虚函数…" << endl; cout << GetInfo() 阅读全文
posted @ 2024-08-23 20:31 double64 阅读(23) 评论(0) 推荐(0)
摘要: #include <string> #include <iostream> using namespace std; namespace { class Animal { public: string GetInfo() { return "我是动物"; } }; class Dog :public 阅读全文
posted @ 2024-08-23 19:42 double64 阅读(15) 评论(0) 推荐(0)
摘要: C++ #include <functional> #include <iostream> #include <vector> #include <memory> #include <set> #include <map> #include <string> using namespace std; 阅读全文
posted @ 2024-08-22 23:18 double64 阅读(36) 评论(0) 推荐(0)
摘要: #include <iostream> #include <string> #include <memory> using namespace std; namespace { class B; class A { public: std::shared_ptr<B> pb; }; class B 阅读全文
posted @ 2024-08-15 12:19 double64 阅读(17) 评论(0) 推荐(0)
摘要: ui.tabObj->insertTab(0, widgetObj1, tr("tabName0")); ui.tabObj->insertTab(1, widgetObj1, tr("tabName1")); ui.tabObj->insertTab(2, widgetObj2, tr("tabN 阅读全文
posted @ 2024-08-13 15:52 double64 阅读(80) 评论(0) 推荐(0)
摘要: #include <iostream> #include <string> namespace { class A { public: void addCount() { ++sumCount; } static int getSumCount() { return sumCount; } priv 阅读全文
posted @ 2024-07-19 19:49 double64 阅读(21) 评论(0) 推荐(0)
上一页 1 ··· 9 10 11 12 13 14 15 16 17 ··· 56 下一页