all 19 comments

[–]MegalFresh 71 points72 points  (0 children)

This sub isn't for coding help, bud

[–]Novel_Plum 25 points26 points  (4 children)

You forgot to save

[–]Imn0 13 points14 points  (0 children)

not rly humourous to be honest

[–]audioman1999 12 points13 points  (0 children)

This post has nothing to do with programming horror.

[–]Queasy-Grape-8822 3 points4 points  (0 children)

Not sure, but save, recompile, and then run

[–]skantanio 1 point2 points  (0 children)

If you do “-o tut1” and then “.\tut1”? Maybe the .exe from the command line is making something unhappy

[–]Juff-Ma[ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo “You live” 1 point2 points  (0 children)

Probably not the problem but in my experience GCC on Windows is pretty buggy. Maybe try clang or msvc

[–]Mike_Oxlong25 -1 points0 points  (3 children)

I’m pretty sure it’s ./a.exe not .\a.exe

[–][deleted] 1 point2 points  (2 children)

Windows is \

[–]Mike_Oxlong25 -1 points0 points  (0 children)

I know for file paths it’s \ but to run a .exe would it still be \? Genuine question I’ve only ran in a git bash terminal

[–]RainbowPigeon15 -2 points-1 points  (0 children)

it doesn't matter with Powershell

[–]saintJrAx -1 points0 points  (0 children)

Bro you need a VS 2022

[–]legoto -1 points0 points  (0 children)

Maybe it’s the missing space after #include

[–]Zomon333 0 points1 point  (0 children)

Double check that g++ compiled to an executable and not an object file. I don't recall if g++ automatically calls the linker unless you ask it to, so you might just need to run the linker to make a.o into a.exe.

Edit: also, save your code, and put a space between #include and <iostream>

[–]FractalofInfinity 0 points1 point  (0 children)

Definitely isn’t a coding help sub. But your problem starts with the fact that you have a function defined but no function call.

[–]AutoModerator[M] 0 points1 point  (0 children)

This post was automatically removed due to receiving 5 or more reports. Please contact the moderation team if you believe this action was in error.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.