VS Code — How to Run C Right Away!
A light IDE, Finally!— Thank God, Bye MS VS Community App #CSeries — Episode #00
Welcome! in this post we will see how we can set up the Visual Studio Code for writing and executing the C/C++ programs.
1#Step — You Will need:
These are the C and C++ toolset and Visual Studio Code installer.
2#Step — So now first let us open up the Visual Studio code; you must install these extensions:
Restart the Visual Studio code.
3#Step — Add a new workspace; Here we will gonna call it as C C++ WS; Save the folder inside this WS;
Let us create a file inside this folder vscode:
Now Let’s get some code!
4#Step — We will create a simple program like this (helloworld.c):
To run this code first please open the PowerShell As Administrador and Give it permission (why?); Use the prompt :)
5#Step — Run the code now by pressing this button!
6#Step — Now How to Take Input? As the output tab is read-only let’s make another program to take it and seehow to get around this issue...
To get some user input, let us run this program (getinput.c) to force entry:
printf("Enter your age: ");
printf("Your age is: %d", age);
7#Step — Final step: Modify The Settings — You almost there! okay now we have to modify some settings so that this program can take some user input.
File > Preferences > Settings > Extensions > scroll down a bit:Run Code Configuration > Run in terminal (check this one)
Come back to the code and right click the button again to run the code.
Now the code will run in the terminal :)
That’s all, folks! Hope that helps!
The reason I made the effort to bring this to you is that I wasted time trying to run the C code. I hope that in 3 or 4 minutes you start coding…this app is awesome, even Python can be run on it…click on it and a window will pop up instantly!
Thank you for reading.
I’ll see you later in the next post about C (searching algorithms)!
References & Credits
Visual Studio Code - Code Editing. Redefined
Visual Studio Code is a code editor redefined and optimized for building and debugging modern web and cloud…
TDM-GCC 10.3.0 is now available, along with GDB 10.2, binutils 2.36.1, and new versions of the MinGW.org and MinGW-w64…
00 Episode#CSeries — VS Code — How to Run C Right Away! A light IDE, Finally! — thank god, Bye MS VS Community app (this one)
01 Episode#CSeries — MUSIC ALBUM_V2.C — This is a Deque in C — Searching Algorithms Studies
02 Episode#CSeries — Hash tables in C — This is a HashTable in C — Searching Algorithms Studies
03 Episode#CSeries — University Catalog V1 — This is a HashTable — Searching Algorithms Studies
04 Episode#CSeries — Bubble Sorting (Ascendant Algorithm) — This is a Simple Sorting — Searching Algorithms Studies
05 Episode#CSeries — Quick Sorting (Ascendant Algorithm) — This is a Quick Sorting — Searching Algorithms Studies
06 Episode#CSeries — Linear Search — This is a Linear — Searching Algorithms Studies
07 Episode#CSeries — Doubly Linked List — Searching Algorithms Studies(this one)
That’s All, Folks!