C是用puts输出字符串的C++是用什么输出字符串的?除了cout
在C++中,除了使用cout<<来输出字符串外,还可以使用printf函数来输出字符串。示例如下:
#include <cstdio>
int main() {
const char* str = "Hello, World!";
printf("%s\n", str);
return 0;
}
原文地址: https://www.cveoy.top/t/topic/h6L3 著作权归作者所有。请勿转载和采集!