0
我嘗試使用Cilk的編譯程序,但它不工作Cilk的錯誤之前預期「)」「;」令牌
g++ -std=c++11 -fcilkplus -lcilkrts -ldl -O2 src/cpp/* -o bin/exe
src/cpp/sous_monoide.cpp: Dans la fonction
src/cpp/sous_monoide.cpp:269:19: erreur : expected ‘)’ before ‘;’ token
cilk_for (i = 0; i < limite; i++){
^
src/cpp/sous_monoide.cpp:269:36: erreur : expected ‘;’ before ‘)’ token
cilk_for (i = 0; i < limite; i++){
^
src/cpp/sous_monoide.cpp:312:1: erreur : expected ‘}’ at end of input
}
^
src/cpp/sous_monoide.cpp:312:1: erreur : expected ‘}’ at end of input
src/cpp/sous_monoide.cpp:312:1: erreur : expected ‘}’ at end of input
這是代碼:
const int limite = n-1;
int i;
cilk_for (i = 0; i < limite; i++){
....
}
謝謝您幫助