C++ array of a self-defined class, no matching function call
问题 I was building a Huffman coding tree and I wanted to create an array where each position contains a separate tree, as the code follows: // Number of initial nodes int number; cin >> number; int* weights = new int[number]; for (int i = 0; i < number; i++) cin >> weights[i]; // Convert to huffman tree with one element intHuffTree* tree = new intHuffTree[number]; for (int i = 0; i < number; i++) { tree[i] = intHuffTree(weights[i]); } where the class is defined like: // Huffman tree with integers