I am trying to find if all the elements of a vector y is equal to 1. The following code works fine in Visual Studio but with g++ in linux (g++ -std=c++0x) it gives me this error: expected primary-expression before ‘[’ token
bool x = all_of(y.begin(), y.end(), [](unsigned char j) {return j == 1;});
Any help would be appreciated.
My gcc version is: g++ (GCC) 4.4.7 20120313 (Red Hat 4.4.7-17)
I am trying to find if all the elements of a vector y is equal to 1. The following code works fine in Visual Studio but with g++ in linux (g++ -std=c++0x) it gives me this error: expected primary-expression before ‘[’ token
bool x = all_of(y.begin(), y.end(), [](unsigned char j) {return j == 1;});
Any help would be appreciated.
My gcc version is: g++ (GCC) 4.4.7 20120313 (Red Hat 4.4.7-17)
I am trying to find if all the elements of a vector y is equal to 1. The following code works fine in Visual Studio but with g++ in linux (g++ -std=c++0x) it gives me this error: expected primary-expression before ‘[’ token
bool x = all_of(y.begin(), y.end(), [](unsigned char j) {return j == 1;});
Any help would be appreciated.
My gcc version is: g++ (GCC) 4.4.7 20120313 (Red Hat 4.4.7-17)
I am trying to find if all the elements of a vector y is equal to 1. The following code works fine in Visual Studio but with g++ in linux (g++ -std=c++0x) it gives me this error: expected primary-expression before ‘[’ token
bool x = all_of(y.begin(), y.end(), [](unsigned char j) {return j == 1;});
Any help would be appreciated.
My gcc version is: g++ (GCC) 4.4.7 20120313 (Red Hat 4.4.7-17)
I am trying to find if all the elements of a vector y is equal to 1. The following code works fine in Visual Studio but with g++ in linux (g++ -std=c++0x) it gives me this error: expected primary-expression before ‘[’ token
bool x = all_of(y.begin(), y.end(), [](unsigned char j) {return j == 1;});
Any help would be appreciated.
I am trying to find if all the elements of a vector y is equal to 1. The following code works fine in Visual Studio but with g++ in linux (g++ -std=c++0x) it gives me this error: expected primary-expression before ‘[’ token
bool x = all_of(y.begin(), y.end(), [](unsigned char j) {return j == 1;});
Any help would be appreciated.
My gcc version is: g++ (GCC) 4.4.7 20120313 (Red Hat 4.4.7-17)
g++: expected primary-expression before ‘[’ token
I am trying to find if all the elements of a vector y is equal to 1. The following code works fine in Visual Studio but with g++ in linux (g++ -std=c++0x) it gives me this error: expected primary-expression before ‘[’ token
bool x = all_of(y.begin(), y.end(), [](unsigned char j) {return j == 1;});
Any help would be appreciated.