Anyone know of a good cheap C++ or free and or course I am getting into C++ and I was looking into making programs and/or plug ins for Ubuntu or a good Linux OS for a gardening project.
For Ubuntu or any Linux or BSD there are two good C++ compiler options and both are free. GCC and LLVM.
I am old school and do my C++ programming in terminal windows, but there are GUI’s. There is Qt Creator, Code Blocks, CLion from Jetbrains. CLion is not free, but it is very good.
I find Gnome and GTK is much harder than Qt for GUI programming so I’d recommend Qt Creator, I think. Plus, it also makes nice Windows programs if that’s something you like.
Sorry I am not up to date on what is good in C++ learning these days.
Linux comes with C++ compilers (by the dozen, as a matter of speech) but gcc is the most common. So, install a Linux distro of choice (like Ubuntu) and install the build-essential package from the package manager. This will set you up with a complete build environment so you can compile and run your programs. For writing C++ code, use a simple text editor or alternatively Bluefish. Still a text editor, but has syntax highlighting for various programming languages.
As for course-work, Bjarne Stroustrup, author of C++, has written a comprehensive book on the subject. Over 1,000 pages, so not light reading nor cheap!
YT also has some interesting stuff, although I haven’t actually viewed it yet:
And to close this contribution, the Master himself:
Only issue there is don’t a system for the Linux distro yet but I guess I could run it in virtual in Windows
You can also use something like WSL2 and/or VSCode if you are on Windows 10. Good luck!
If you’re on Windows and want a free C++ compiler I would recommend Visual Studio Community Edition. It is good and free too.
Thanks everyone for your recommendations
Vscode as an IDE, clang as the compiler itself, you can run builds/code itself in WSL.
Here’s a friend setting up his windows 10 development environment for Linux coding. https://twitter.com/flameeyes/status/1341112274535256065
Visual Studio Community is neat AF, but if you intend to use it commercially you gotta pay
if you intend to do some windows stuff you should get it tho
if you intend to use linux you could spin a VM, probably Ubuntu or even Xubuntu or Debian with XFCE (they’re light), might use VirtualBox from Oracle, it’s easy
if I recall correctly you’ll have to install g++ on top of build-essential on debian and ubuntu… but you’ll be fine
a course I have on udemy uses CodeLite, which is not completely terrible
here it is:
if you want to do a quick project tho you could try C# with WPF, basically drag and drop… or even java with scene builder or javafx on gui builder on netbeans
This site has always been pretty helpful for me for C++
for C you could check out this book which is a manning.com book but has a creative commons version on the authors site but I have not read it.
Modern C by. Jens Gustedt
VS code + WSL
The biggest difficulty with C++ is libraries, they are not portable across platforms and are much more painful to get working than other programming languages.
If you are on Linux, the package manager for your distribution can be used to install libraries and in general that works very well. I have always found it easier to use Linux for C++.
On Windows use Visual Studio (Community Edition or not). You can use GCC or LLVM/Clang on Windows, but C++ libraries will generally not work across compilers on Windows. (Clang might work, but it is work in progress I believe.) Some open-source projects might not release compiled binaries at all for Windows, but if they do it is nearly always for Visual Studio.
MSYS2 which is a kind of package manager for developing on Windows which is what I would recommend if you want to use GCC or use a lot of open-source libraries, but it can be kind of tricky to get up and running.