忘记使用 %s 占位符:
std::string str = "Hello";printf(str); // 错误,应该使用 printf("%s", str.c_str());忘记转换 std::string 到 const char*:std::string str = "Hello";printf("%s", str); // 错误,应该使用 printf("%s", str.c_str());忘记在末尾加上换行符 \n:std::string str = "Hello";printf("%s", str.c_str()); // 没有换行符使用错误的格式化字符串:std::string str = "Hello";printf("%d", str.c_str()); // 错误,应该使用 %s 占位符 

