Setting up vscode for c++ in linux - c++

I am trying to set up vscode to do c++ programming on linux. I am confused about the instructions given. Do I need either one or both of these things given below to compile and debug my c++ code?
Can I use only cmake to compile run and debug my code? If so, do I still need the tasks.json and launch.json?
https://code.visualstudio.com/docs/cpp/config-linux
https://code.visualstudio.com/docs/cpp/cmake-linux

You can use cmake extension here.
Follow the setup instructions from here
I use it and it works perfectly.

Related

C++ on VScode is not working when I run my code

So, I just recently started learning C++ and my cousin said that a good IDE was VScode. So, I installed VScode, downloaded the extensions that supported C++, and wrote my programs and got this:
"g++" is not recognized as an internal or external command.
what do I do here? I have looked at other questions that ask the same questions, but all of them mainly say to download a compiler like MinGW (Which I already have) and CygWin (also have downloaded this one). So what do I do?
Based on the OS, you need to add path to g++ to PATH variable.
Check ~/.profile file?
Also check:
https://github.com/microsoft/vscode-cmake-tools/issues/576

How can I specify C++ standard version in DPC++ compiler options?

I stumbled upon free stuff in the form of Intel oneAPI toolkit and everything works great, the samples compile fine but I don't know how to specify the C++ standard in the compiler options. From what I understand DPC++ is built on top of Clang so I should be able to choose which C++ version it compiles for but I don't know how.
How do I get my C++17 code to work?
This is an ongoing issue, there are reports of other users with the same issue. As far as I know it hasn't been solved yet, what you can do meanwhile is to run the program from the command line:
Go to the folder where you installed OneApi, let's say C:\Program Files (x86)\inteloneapi\ and run setvars.bat to set environment variables.
Then compile the program using the C++17 flag, navigate to the folder where the source code is and run dpcpp filename(s).cpp -std=c++17.

How can you use C++ in IntelliJ IDEA?

The question is in the title.
So far I've only used IntelliJ for Java. Do I need to download some sort of Compiler or how can I create C++ files?
Like #dddavid said,there is an IDE made by JetBrains for C/C++ called Clion.
It is quite easy to use if you are familiar with intelliJ
However, if your question is how to compile and run C/C++ in intelliJ, there are still ways for you! (Which is not recommended if you are trying to develop large project in C/C++ in intelliJ.)
If you really want to do that, there is a terminal in intelliJ.
If you are in linux system, try to get gcc for C and g++ for C++.
If you are in windows system, you can try to get mingw or other compilers for C/C++.
After getting the compiler, you could simply type commands in the terminal inside intelliJ to compile C/C++ and run it.
For example, if you are in linux with g++, if you wants to compile main.cpp:
Follow these step:
type g++ main.cpp in the terminal inside intelliJ
type ./a.out in the terminal inside intelliJ
And it will start to run your C/C++ program!
You should use CLion instead. It's the JetBrains IDE for C/C++.

How to successfully run cudd library in window

is there any Binary Decision diagram (BDD) is available in windows.i tried to run cudd in vc++6.0..which is mention link
http://web.cecs.pdx.edu/~alanmi/research/soft/softPorts.htm
but it isn't working properly.i get compiler error while running a sample code
I compiled CUDD for Windows, but using MinGW not a Microsoft environment. My goal was that compiler since I use Dev-C as IDE.
I did a first try using Cygwin, but with no luck. The second try was with MSYS, an environment to run unix commands that come with MinGW for Windows. Note that CUDD uses a couple of POSIX libraries (such as ). Luckily they are used only in two secondary functions: CPU stats and a kind of fork that I didn't fully understood. Since I didn't need those, I simply commented the portion of code (in util/cpu_stats.c).
Then you only need to write a Makefile for MinGW in order to link the library!
If you need it, I can send to you the library already compiled.

How to Compile and Debug C++ in Notepad++ using Turbo C++ Compiler

I have installed NppExecute plugin in notepad++. I am not able to figure out next step to compile and debug C,C++ programs in Notepad++.
System Details: (a) Turbo C directory C:\TC (b) OS Windows 7
Please provide complete details on how to set Environment Variable and Scripts for Compiling and Debugging.
Notepad++ has the run feature, but as far as I know it's unable to help you debugging (e.g. stepping through code, watching variables, etc.).
Your best bet would be using a simple batch file to compile the code and run your debug commands, but as far as I know you can't include everything into Notepad++ (i.e. it's no real C/C++ IDE).
Only option you've got is adding the created batch file as the program to be run by NppExecute.
Edit:
Overall, as rkosegi suggested, if possible, use a more up-to-date toolchain.
Microsoft's Visual C++ Express Edition can be downloaded for free and used for private or commercial projects.
If you target cross platform code, it might be easier to use MinGW to use GCC/G++ under Windows.
I wondering why somone wants to use turbo C++.If you run Windows, just use Visual Studio Express, or Dev-C++.If you still want to use Turbo C you will run into several problems with compatibility of this ancient software.