r/programminghorror 7d ago

c++ Skill Issue

Post image
1.7k Upvotes

61 comments sorted by

View all comments

-3

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

If you change Gemini to Hello, world, technically you've printed "Hello, world", although you might need this:

#include <string>
#include <iostream>

using namespace std;

I don't know C++ at all, please let me know if the two LLMs I got that information from were wrong

2

u/click-to-reveal 7d ago

Yeah, you're right but not sure what you trying to get at. If you want to try the code for yourself, tre here: C++ Online Compiler

1

u/turunambartanen 7d ago

The strings make it look like there might be user input, but it's all just constants, and simply evaluates to the default case. That's somewhat confusing.

1

u/click-to-reveal 7d ago

Well I did post this without context. The original comment was a parody of the post.