这是我的结构(它在数据结构类的私有部分):
private:
// this is the main node pointer array to keep
// track of buckets and its chain.
struct Node {
/** member variables */
unsigned int iCID;
std::string sVoting_PN;
std::string sTS[T_LITTRAL];
unsigned int iCounter[12] = {0};
/** constructor initializes */
Node(unsigned int CID, std::string PN, std::string TS, unsigned int counter, unsigned int index ) {
this->iCID = CID;
this->sVoting_PN = PN;
this->sTS[index] = TS;
this->iCounter[CID] = iCounter[CID] + counter;
}
Node *next;
};
Node* nodeArray[TABLE_SIZE];
我想将 iCounter 数组的所有值初始化为 0。我该怎么做?
我试过这个
unsigned int iCounter[12] = {0};
但它给了我警告,无论如何我都必须删除!非常感谢任何想法或帮助。提前致谢。