6
"त्रुटि एक प्रकार अपेक्षित हैं, 'classname' मिल गया" निम्नलिखित कोड का उपयोग करना:: C++
template <typename T>
class node {
[. . .]
};
class b_graph {
friend istream& operator>> (istream& in, b_graph& ingraph);
friend ostream& operator<< (ostream& out, b_graph& outgraph);
public:
[...]
private:
vector<node> vertices; //This line
मैं हो रही है:
error: type/value mismatch at argument 1 in template parameter list for ‘template<class _Tp, class _Alloc> class std::vector’
error: expected a type, got 'node'
error: template argument 2 is invalid
संकेत लाइन पर। नोड स्पष्ट रूप से बी_ग्राफ से पहले परिभाषित किया गया है जो इसका उपयोग करता है - मैंने यहां क्या किया है?
ओह! ठीक है। धन्यवाद, यह काम किया। – Bay
धन्यवाद - मुझे खोज करते समय आपका जवाब मिला और उसने मुझे कुछ समय बचाया। –