#Getting Error implicit declaration of function 'printf' [-Wimplicit-function-declaration].
16 messages · Page 1 of 1 (latest)
When your question is answered use !solved to mark the question as resolved.
Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question use !howto ask.
Are you sure you saved the file with the header include in it?
You are better off using Visual studio.
your code is entirely correct; "Implicit declaration of function 'printf' " is basically just a way to say that it can't find that function. i can't tell you the exact answer, because i don't know how your environment is set up, but the issue is that the standard library (which has stdio.h) is not being linked with the program when it's compiled
... or it's some other weird issue
but that's my best guess?
Either this isn't the code you're compiling (you didn't save the file or are compiling a different file), or you edited stdio.h and messed something up in there
This problem has nothing to do with mingw vs msvc. I understand when people suggset VS when running into one of mingw's quirks, but this isn't one of them
The problem is setting up VSCode for projects as a beginner-- not the compiler here. Visual Studio would set it up properly
🤷♂️
Having to learn to press ctrl+s is a difficulty curve, that's for sure 😛
Getting VSCode's code runner to work can either be a quick 10 second copy paste or a half hour long or longer painstaking process