c++ - error: expected primary-expression before ‘int’ -


i'm using: gcc --version gcc (ubuntu 4.9.2-0ubuntu1~14.04) 4.9.2

i'm trying compiler following program:

#include <iostream> #include <cilk/cilk.h>  using namespace std;  int main(){      cout << "\nstart\n";     cilk_for (int = 0; < 10; i++) {         cout << "i = " << i;     }  } 

but following error:

g++ -fcilkplus cilk_1.cpp  cilk_1.cpp: in function ‘int main()’: cilk_1.cpp:9:12: error: expected primary-expression before ‘int’   cilk_for (int = 0; < 10; i++) {             ^ cilk_1.cpp:9:23: error: ‘i’ not declared in scope   cilk_for (int = 0; < 10; i++) {                        ^ 

what wrong ?

thanks

from link chris gave in comments, seems gcc 4.9 supports features of cilk extensions except _cilk_for out of box. therefore, compiler (gcc 4.9) not have cilk_for support.


Comments

Popular posts from this blog

c# - Better 64-bit byte array hash -

webrtc - Which ICE candidate am I using and why? -

php - Zend Framework / Skeleton-Application / Composer install issue -