diff --git "a/md/02\344\275\277\347\224\250\347\272\277\347\250\213.md" "b/md/02\344\275\277\347\224\250\347\272\277\347\250\213.md" index abcae16f..18dbe517 100644 --- "a/md/02\344\275\277\347\224\250\347\272\277\347\250\213.md" +++ "b/md/02\344\275\277\347\224\250\347\272\277\347\250\213.md" @@ -91,7 +91,7 @@ auto sum(ForwardIt first, ForwardIt last){ std::size_t remainder = distance % num_threads; // 存储每个线程的结果 - std::vectorresults(num_threads); + std::vector results(num_threads); // 存储关联线程的线程对象 std::vector threads; diff --git "a/md/03\345\205\261\344\272\253\346\225\260\346\215\256.md" "b/md/03\345\205\261\344\272\253\346\225\260\346\215\256.md" index a2b6cc60..f1633a48 100644 --- "a/md/03\345\205\261\344\272\253\346\225\260\346\215\256.md" +++ "b/md/03\345\205\261\344\272\253\346\225\260\346\215\256.md" @@ -371,7 +371,7 @@ std::size_t n{}; void f(){ std::lock_guard lc1{ m1 }; - std::lock_guard lc2{ m2 };; + std::lock_guard lc2{ m2 }; ++n; } void f2() {