r/C_Programming • u/MateusCristian • Jan 16 '26
Question VS Code for learning C?
I'm starting to learn C, just bought the King's book online, and I wanna know if this book can be followed on VS Code, or if I should use a different IDE or such.
21
Upvotes
•
u/AutoModerator Jan 16 '26
Looks like you're asking about learning C.
Our wiki includes several useful resources, including a page of curated learning resources. Why not try some of those?
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
31
u/HashDefTrueFalse Jan 16 '26
Any IDE or text editor whatsoever. You just need a compiler (gcc, clang, msvc etc.).
10
u/questron64 Jan 16 '26
It's fine, but follow the directions for installing the C/C++ extension and a compiler. VS Code by itself is just an editor, it doesn't include these things out of the box. Don't put much thought into which editor or IDE you use right now. Get something that works and has an easy debugger (VS Code satisfies this requirement) and just use it. Try not to get into advanced features right now as typing code in, and compiling, running and debugging your code is what you should be completely focused on right now.
3
u/EpochVanquisher Jan 16 '26
If you are on Windows, you will probably have a better time if you start with Visual Studio.
If you are on the Mac, you should install Xcode and try it out.
You can always switch later, but Visual Studio and Xcode are full IDEs and include everything you need to write C. VS Code does not include everything, so you will have to install extra software if you use VS Code.
7
u/SmokeMuch7356 Jan 16 '26 edited Jan 17 '26
It's fine, just make sure you install the C/C++ extensions.
If you want to party like it's 1987,1 open a terminal session and edit your source code using
vim(oremacsornanoor whatever text editor is your favorite):then once you've saved the file, exit the editor and compile manually with
gcc:-ospecifes the name of the final executable file,-std=c17tells it to use the 2017 version the standard (c23should also be supported by now, which is the most recent),-Wall -Werror -Wextrabasically crank up the warning level and treat all warnings as errors.Now you can run your file as
I will argue that this path is less heartburn-inducing than using VSCode.2 It's a nice environment (like, really nice), but getting everything set up correctly can be a massive pain in the ass. For people with weapons-grade ADHD like myself, that's a problem, so I default to the command line where I can.
3
u/Walid_08 Jan 16 '26
I'm also planning to start with this book. I'm using vs code on Linux.
1
u/Desperate-Dig2806 Jan 16 '26
It's debatable what our AI friends are good for but most of them will help you get a good setup in vscode.
That said, I'd write some toy programs and link one external library from the command line first before going all in to get some understanding of the moving parts.
1
u/Secure-Photograph870 Jan 16 '26
Your IDE doesn’t matter, you could use Notepad it will be the same. Use whatever is best for you, if it’s VSCode, fine, if it’s NeoVim, that’s fine as well. What matter is the toolchain that will allow you to compile your code.
1
u/ExactArachnid6560 Jan 16 '26
Vscode is only a text editor, not an IDE. You can use an extension which helps you with linting and intellisense. You still have to compile the program with a compiler like gcc via the terminal. You can however configure vscode and the C/C++ extension to do that for you.
-1
u/qruxxurq Jan 16 '26
None of the tools makes any difference.
0
u/ecwx00 Jan 16 '26
VS Code is fine, What compiler do you use (if you're on windows)?
Something like Dev++ makes ot easier for windows user because it installs the compiler and linker for them.
I used to code on Linux. On linux, setting up C dev toolchains is trivial, not so much on Windows.
Now I only code C as a hobby and I spend most of my time on Windows, I use Visual Studio Code as my code editor, and I use MingW for my C dev tools, or I just compile my code on a dev containers.
0
u/studiocrash Jan 17 '26
It’s a fine editor. Probably the most used editor btw. The most important thing though is learning and practicing the content.
The editor is just a tool. Nobody hires a carpenter because they chose DeWalt over Craftsman. It’s about the skills.
0
u/grimvian Jan 17 '26
Code::Blocks, because it's easy and fast to install, easy to use, everything is ready from start and it's open source!
If you are using Linux Mint, it ready in Software Manager.