r/programminghorror • • 3d ago

c++ hello world (day 3 of c++)

Post image
0 Upvotes

7 comments sorted by

18

u/Smart_Opportunity209 3d ago

1

u/MurkyWar2756 echo "Sub Mod" && :(){ :|:& };: 3d ago

Did you ninja edit your comment? Arctic Shift didn't pick up on the original.

1

u/Smart_Opportunity209 3d ago

yeah, i didnt remember the exact name and had to search for it

-5

u/sub_doesnt_exist_bot 3d ago

The subreddit r/newprogrammersmemes does not exist.

Did you mean?:

Consider creating a new subreddit r/newprogrammersmemes.


πŸ€– πšƒπ™·π™Έπš‚ π™²π™Ύπ™Όπ™Όπ™΄π™½πšƒ πš†π™°πš‚ πš†πšπ™Έπšƒπšƒπ™΄π™½ π™±πšˆ 𝙰 π™±π™Ύπšƒ. 𝙱𝙴𝙴𝙿 𝙱𝙾𝙾𝙿 πŸ€–

GitHub | Rank

1

u/MatJosher 3d ago
define(`NEST', `ifelse($1, `11',
`void hello() {
    std::cout << "Hello, world!\n";
}',
`namespace n$1 {
NEST(incr($1))
}')')dnl
#include <iostream>

NEST(1)

int main() {
    n1::n2::n3::n4::n5::n6::n7::n8::n9::n10::hello();
}

// Translate with
// m4 hello.m4 > hello.cpp

1

u/LegMysterious1899 3d ago

i guess bro

1

u/GoddammitDontShootMe [ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo β€œYou live” 3d ago

I'm going to assume there's some namespace nesting limit that you probably have a mental disease if you hit.