Mooophy / Cpp-Primer

C++ Primer 5 answers
Creative Commons Zero v1.0 Universal
8.11k stars 3k forks source link

fix compile error #834

Closed postman01 closed 1 year ago

postman01 commented 1 year ago

Compile error: $ clang++ -o t ex17_33.cpp -std=c++11 ex17_33.cpp:50:44: error: expected parameter declarator default_random_engine e(unsigned int(time(0))); ^ ex17_33.cpp:50:44: error: expected ')' ex17_33.cpp:50:43: note: to match this '(' default_random_engine e(unsigned int(time(0)));

clang version: $ clang++ --version Apple clang version 13.1.6 (clang-1316.0.21.2.5) Target: arm64-apple-darwin21.6.0 Thread model: posix InstalledDir: /Library/Developer/CommandLineTools/usr/bin