#include
int main() {
std::cout << "碼農谷,hello world!" << std::endl;
return 0;
}
#include
int main() {
printf("碼農谷,hello world!\n");
return 0;
}
iostream / cout 是 C++ 標準庫,類型安全、可擴展。cstdio / printf 是 C 標準庫,C++ 完全支持,需包含 cstdio(而非 stdio.h)。iostream,格式化輸出可用 iomanip。