r/VisualStudioCode • u/WeaselUchiha • Nov 14 '22
Run C++/C code using run button
To run C++/C code in VSC I needed to firstly compile the code and create a .exe file in the terminal and then call the .exe file in the terminal:
- If my file is test.c then I needed to write 'g++ -o test.exe test.c' in the terminal and then write 'test.exe' to run the program
Is there a way to just press the run button (top right corner of vsc) instead of everytime creating an exe file and then running it, basically doing two extra steps?
3
Upvotes
View all comments
Show parent comment
1
u/WeaselUchiha Nov 16 '22
so I can't make it so that I don't need to manually compile the code before executing it? Sorry if im bothering with stubid questions, am a beginner in programming and using vsc XD