包含标签:constructor 的文章
-
为什么我收到 [错误] 没有匹配的函数来调用“car::car()”
我已经用两个成员变量 a 和 b 创建了两个类 car 对象……我想创建一个新对象,其 a 和 b 是我之前创建的对象的 a 和 b 的乘积。 #include<iostream> using…… -
如何在构造函数中将指针数组全部设置为nullptrs?
class TrieNode { public: TrieNode() : next{new TrieNode *[26]} {} TrieNode **next; string word; }; 我必须为此应用程序使用原始指针,我想……