Easier C++ Hello World
Writing Hello World in C++ has never been easier auto& hello(std::ostream& os) { return printf("Hello, World!\n"), os; } int main() { std::cout << hello; }
A screenshot presents a clever C++ implementation of “Hello, World!” where a function returns the output stream after calling printf, allowing it to be passed directly to std::cout. The joke is that a traditionally simple beginner program is made unnecessarily elaborate, while humorously claiming this is the easiest way to write it. EN: A screenshot presents a clever C++ implementation of “Hello, World!” where a function returns the output stream after calling printf, allowing it to be passed directly to std::cout. The joke is that a traditionally simple beginner program is made unnecessarily elaborate, while humorously claiming this is the easiest way to write it.
- @ithueti / 3385 2020-12-16
- Type
- image
- Size
- 800×575 · 54.7 KiB
- Mood
- sarcastic
- Language
- en
- Added