Welcome to my first post! I will be showing you how I develop C++ using Visual Studio Code along with the C++ and Easy C++ Projects extensions.
...
For further actions, you may consider blocking this person and/or reporting abuse
I´m a complete beginner at coding and is looking for a nice and simple IDE to use, I´m currently using ms visual studio but i want to find a more lightweight IDE for storage reasons. I tried vscode a bit, i managed to install a compiler but then all of a sudden i needed to edit json files and such things and i have no idea how to do that. I looked at youtube videos but learning all that AND c++ was too much information at once. I´m learning to program in c++ at the moment and will be moving on to c# in a few weeks, does this method make it easier to compile and debug projects? or is there another IDE you can recommend?
If you know how to install your compiler it is much faster to develop with VSCode and this extension imo, it has intellisense and automatic project creation!
I've managed to install the compiler but when it comes to configuring .json files and such things I'm lost.
If you create the project using Easy C++ you don't need to set up any json file yourself, you press F1, search for Easy C++ create new project and it will set everything up. A couple of buttons will show up at the bottom bar for building and running the project.
Allright I'll look in to it 😊👍🏻
I can't seem to figure out why I keep getting the following error when trying to run just the "hello world" project Easy C++ makes.
"The terminal process terminated with exit code: 1
Terminal will be reused by tasks, press any key to close it."
I think that's because the template that Easy C++ Projects makes doesn't include a "return 0" statement, so the shell never knows that it exited successfully. I prefer C/C++ Project Generator to Easy C++ Projects, and would reccomend trying that.
I get the same error
can someone help me please?
whenever I click at build and run, It shows error like permission denied and then says error at int main()
Hey! Can you give us some context? What OS are you using? Are the folder permissions correct?
Actually it was a problem with permissions. I am using Ubuntu 19.04 . The executable permission was not given.
I'm glad you got it solved! I'll take note of this to see if it is isolated to Ubuntu 19.04 or I should upload a fix, thank you for the info!
Actually. It was due to my own ignorance. I forgot about the file permissions in linux. All you need to do is add the executable permission using the chmod +x command.
This is not a complete guide to begin code with c++ language. Sad but true. Default C/C++ extension doesn't provide full compilation support. Needs gcc compiler...
Great post! I was looking for a substitute for eclipse-cdt. Do you think vscode can be a good comperitor to eclipse?
I was an Eclipse user and never went back when I changed to VS Code!
I've used both and personally prefer VS Code.
Personally, I prefer "C/C++ Project Generator" to "Easy C++ Projects". It works without asking you confusing questions about the platform. Also, I really like "Project Templates", because you can start with the basic template from the project generator, then tweak the Makefile and includes to make a more customized template. I currently have one for SFML, because it would be a pain to have to set it up every time.
Thanks, worked like a charm!
Thanks for the post, worked perfectly on Windows 10
I was wondering if its is possible to debug in VS code by using the WSL (with g++ or gcc install) ?