/ / बूस्ट: टेम्पलेट तर्कों की गलत संख्या - सी ++, बूस्ट

बूस्ट: टेम्पलेट तर्कों की गलत संख्या - सी ++, बूस्ट

मैं सी ++ के लिए काफी नया हूं और पुस्तकालय को बढ़ावा देता हूं: सुनिश्चित नहीं है कि मैं निम्नलिखित कोड में क्या कर रहा हूं: मैं यहां पाया गया उदाहरण का पालन कर रहा हूं http://www.richelbilderbeek.nl/CppBoostGraphExample4.htm

 typedef boost::adjacency_list
<
//Store all edges as a std::vector
boost::vecS,
//Store all vertices in a std::vector
boost::vecS,
//Relations are both ways (in this example)
//(note: but you can freely change it to boost::directedS)
boost::undirectedS,
//All vertices are person names of type std::string
boost::property<boost::vertex_name_t,std::string>,
//All edges are weights equal to the encounter frequencies
boost::property<boost::edge_weight_t,double>,
//Graph itself has a std::string name
boost::property<boost::graph_name_t,std::string>
> Graph;

जब मैं कोड प्राप्त करने की कोशिश करता हूं तो मुझे मिलता है

त्रुटि: टेम्पलेट तर्कों की गलत संख्या (1, 3 होना चाहिए) /usr/include/boost/pending/property.hpp:22 त्रुटि: "tempate struct boost :: property" के लिए प्रदान की गई

मेरे कोड में त्रुटि इस पंक्ति को इंगित कर रही है:

boost::property<boost::edge_weight_t,double>

मैं पुस्तकालय के संस्करण 1.55 का उपयोग कर रहा हूँ

उत्तर:

उत्तर № 1 के लिए 1

आप हेडर के गलत संस्करण सहित प्रतीत होते हैं। यदि आप पथ की जांच करते हैं property.hpp यह एक रास्ता नहीं मिल रहा है boost_1_55_0 सबट्री।

यह बूस्ट 1_55 के साथ मेरे उबंटू बॉक्स पर संकलित है