Skip to content

Commit ace0fb7

Browse files
committed
fix do_register
1 parent d79a47d commit ace0fb7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

main.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ std::map<std::string, long> has_login; // 换成 std::chrono::seconds 之类的
1919

2020
// 作业要求1:把这些函数变成多线程安全的
2121
// 提示:能正确利用 shared_mutex 加分,用 lock_guard 系列加分
22-
bool do_register(std::string username, std::string password, std::string school, std::string phone) {
22+
std::string do_register(std::string username, std::string password, std::string school, std::string phone) {
2323
User user = {password, school, phone};
2424
if (users.emplace(username, user).second)
2525
return "注册成功";

0 commit comments

Comments
 (0)