|
|
-pthread
to use threading:~ $ g++ -Wall -Wextra -pedantic-errors -O3 -std=c++11 -pthread -o test test.cc ~ $ ./test Checking whether 313222313 is prime. Calculating. Please, wait... It is prime! |
$ g++ -Wall -Wextra -pedantic-errors -O3 -std=c++11 -pthread -o astest astest.cc $ ./astest Checking whether 313222313 is prime. terminate called after throwing an instance of 'std::system_error' what(): Unknown error -1 |