[英]LEDA programming with c++:
I am a LEDA-6.3 user. 我是LEDA-6.3用户。 I have an error when compiling this simple code:
编译以下简单代码时出现错误:
#include <LEDA/core/d_array.h>
#include <iostream>
using namespace std;
main()
{
d_array<string,string> dic;
dic["hello"] = "hallo";
dic["world"] = "Welt";
dic["book"] = "Buch";
dic["key"] = "Schluessel";
string s;
forall_defined(s,dic) cout << s << " " << dic[s] << endl;
}
G++ Compiler: G ++编译器:
g++ -I$LEDAROOT/incl -L$LEDAROOT d_array.cpp /usr/lib/LEDA/libleda.a -lX11 -lm -o d_array
The ERROR: 错误:
d_array.cpp: In function ‘int main()’: d_array.cpp:8: error: ‘d_array’ was not declared in this scope d_array.cpp:8: error: expected primary-expression before ‘,’ token d_array.cpp:8: error: expected primary-expression before ‘>’ token d_array.cpp:8: error: ‘dic’ was not declared in this scope
Please if there is a guide for LEDA-6.3 give me the link 如果有关于LEDA-6.3的指南,请给我链接
您可能是指leda::d_array
或者正在忘记using namespace leda;
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.