MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1xvuqmq/cppythrusgosharp/19smi7lni9p35/
r/ProgrammerHumor • u/Depixelation • 12d ago
36 comments sorted by
View all comments
0
Can someone tell me how to write c++ now? Im like really confused
1 u/A_72_ 11d ago Version 1 - The Classic: #include <iostream> int main() { std::cout << "Hello world!"; return std::cout.fail(); } Version 2 - The Modern Way: import std; int main() { try { std::print("Hello world!"); } catch (std::exception const&) { return 1; } }
1
Version 1 - The Classic:
#include <iostream> int main() { std::cout << "Hello world!"; return std::cout.fail(); }
Version 2 - The Modern Way:
import std; int main() { try { std::print("Hello world!"); } catch (std::exception const&) { return 1; } }
View all comments
0
u/stillalone 12d ago
Can someone tell me how to write c++ now? Im like really confused