摘要:
class String{ private: char* m_Buffer; unsigned int m_Size; public: String(const char* string){//首先const char* 等同于string m_Size=int(strlen(string));// 阅读全文
posted @ 2023-09-05 16:49
iu本u
阅读(21)
评论(0)
推荐(0)
摘要:
唯一指针不能复制,它的参数不能使用new关键字创建。 std::unique_ptr<Entity>entity=std::make_unique<Entity>(); std::unique_ptr<Entity>e0=entity; 共享指针有一个引用计数,当计数为0就宣布释放内存。 { std 阅读全文
posted @ 2023-09-05 15:52
iu本u
阅读(29)
评论(0)
推荐(0)
摘要:
dfs lass Solution { public: unordered_map<int,vector<int>>m; void dfs(TreeNode* root,int depth){ if(!root)return; int res=0; depth++; dfs(root->left,d 阅读全文
posted @ 2023-09-05 15:02
iu本u
阅读(22)
评论(0)
推荐(0)

浙公网安备 33010602011771号