diff --git a/exercises/26_std_string/main.cpp b/exercises/26_std_string/main.cpp index ce0f039b..d8b27627 100644 --- a/exercises/26_std_string/main.cpp +++ b/exercises/26_std_string/main.cpp @@ -1,7 +1,18 @@ #include "../exercise.h" #include +// READ: 字符串 + int main(int argc, char **argv) { - ASSERT(false, "todo!"); + // READ: 字符串字面量 + using namespace std::string_literals; + auto hello = "Hello"s; + auto world = "world"; + // READ: `decltype` 表达式 + // READ: `std::is_same_v` 元编程判别 + ASSERT((std::is_same_v), "Fill in the missing type."); + ASSERT((std::is_same_v), "Fill in the missing type."); + // TODO: 将 `?` 替换为正确的字符串 + ASSERT(hello + ", " + world + '!' == "?", "Fill in the missing string."); return 0; }