Sign in to follow this  
blackone

Getting back into C++

Recommended Posts

Several years ago (15+) I was programming a little in C/C++, but since then I've mostly been working with C#. Recently I've been looking at a few tutorials and it seems like I can hardly recognize the language any more? It seems like a lot has happened and I'm not quite sure where I should start? C++11? Boost? Clang? All of the above?

I would prefer working with Visual Studio. I'm not too interested in GUI stuff. Outside of "pure coding" I'm mostly interested in threading, networking (Is writing code for Linux in Visual Studio a pain?), file IO and perhaps SQL - in that order.

Share this post


Link to post
Share on other sites
I would suggest getting familiar with C++11/14/17 first. The implications of C++11 on threading are massive and well worth knowing. Networking isn't quite as far along but it shouldn't be too hard to brush up on that as well.

Share this post


Link to post
Share on other sites
Using Visual Studio to deploy for Linux isn't bad. It was a lot worse in the past. If you prefer Visual Studio, at least try it and see for yourself. It's purely an opinion, so I can't promise you will agree.

Just jump in for content, but make sure you find resources using C++ 11 or 14. Do a threading tutorial if needed, then just play around for a while. Do the same for each topic. But never fear doing intro-level tutorials, no matter how much experience you have. They're super quick when you have experience. You can just skip a ton of it. I've been coding for almost twenty years, but if you looked at my browser history six months ago you'd think I was in high school. (I did the opposite transition, from C++ to C#)

Share this post


Link to post
Share on other sites

I recommend that you pick up a copy of Stroustrup's "The C++ Programming Language" as for me it was a very nice introduction to C++11 (I had a background of some 10 years with Java and it was very easy to pick up C++ thanks to this book). I'd first focus on the core "modern" C++ first if I were you.

Boost has some nice libraries as well but they're more situational. I quite like their File I/O so since you mention it you might want to take a look at Boost.Filesystem and Boost.ASIO.

For SQL, it depends on your needs, but if you just want to get some configuration store going then sqlite is a nice package and in the public domain. If you want to connect to native databases you'll want to take a look at whatever driver they're offering, so for instance Connector/C++ for MySQL.

Visual Studio 2017 Community now has Linux cross-compilation as a first-tier citizen (along with Android and Unity/Unreal support and many other useful things like ant and Git), but I haven't actually tried it yet so can't comment on the quality.

Share this post


Link to post
Share on other sites

JetBrains CLion is an IDE for C++ that works directly on Linux and other systems. I use it at work and do not miss being limited to Windows. It has free student/hobby licenses but you have to renew them yearly and there is no express version. Since it builds on CMake, you can just keep programming with another editor if the free license runs out or if you just don't want to subscribe anymore.

+ Intuitive debugger.

+ Built in static analysis.

- The settings are overly complex since it is still in development.

- Editing text may feel weird until you configure it right.

Edited by Dawoodoz

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this