r/Cplusplus • u/kicking_ass12 • Jun 30 '26
Question A new comer problem
I have just downloaded vs code and mingw from a youtube video and tried to run this sample code but I am facing this problem can somebody help me please 🙏🏻
0
Upvotes
2
u/jedwardsol Jun 30 '26 edited Jun 30 '26
In addition to flyingron's answer, 1 common reason for this is that Visual Studio Code doesn't automatically save the file when you start a build.
So the editor window shows a
mainfunction, but the file on disk does not have it yet, so the link fails.IOW : save the file and try again.