Top products from r/cpp

We found 143 product mentions on r/cpp. We ranked the 123 resulting products by number of redditors who mentioned them. Here are the top 20.

Next page

Top comments that mention products on r/cpp:

u/just_had_to_reply · 52 pointsr/cpp

For the salty:

What is the best advice you can give someone just starting a CS education?

Get good at the fundamentals: algorithms, data structures, machine architecture. Learn to use a programming language (or their support system), and not just a language. Work on other major projects.
All the trendy stuff you will learn along the way. When you will be good at the fundamentals, you will be good at games, graphics, web design, networking, security, etc. It’s also beneficial if you know some mathematics.
Here are some links on software, and education.

Hey Bjarne. Which C++ compiler do you use?

GCC or Microsoft, soon Clang (again) as well. To be certain and achieve portability it’s better to use more than one. When I teach students it’s always Linux, Windows AND Apple.

Hey Bjarne. Have you heard of Mozilla's newly developed Rust programming and, if so, what is your opinion about it? It seems to me that it could be a really good competitor to C ++, with, among other easily guaranteed memory safety and safe parallelism .

I know a little bit of rust, and many other languages, but my work is focused on C++ and the use of C++.

If has long (decades) been my ideal to make C++ completely type and resource safe. We are almost there: http://www.stroustrup.com/resource-model.pdf. It's part of a fairly ambitious program to modernize the C++ use: https://www.youtube.com/watch?v=1OEu9C51K2A and https://github.com/isocpp/CppCoreGuidelines.

All too often C++ is used as if it's still 1990.

What is your opinion about C (and C ++)'s use of null - termination of strings. Opposed to, for example, Pascal. With many security holes to follow. C ++ will of course have to continue using the null - termination for simple strings, in order to remain compatible with C. (/u/kingguru stresses that you have the ability to use std :: string ) https://en.wikipedia.org/wiki/Null-terminated_string#History

I prefer std :: string. It is not zero- terminated and easier to use than char. You get nothing from using char to communicate with C. "Safety" is much more than just using a single type (or not). "Security" has to do with the whole system; a hacker goes after what is now the easiest to break through. As far as I know SQL injection is still language dependent (SQL can be used from any language) and very popular with hackers. C ++ is type and resource safe: http://www.stroustrup.com/resource-model.pdf.

Hey Bjarne. I have heard that you are good at answering emails, etc., I would like to say thank you for coming here to answer our stupid questions ;) My first question is probably one that could trigger a much and too long answer:

  1. If you had the knowledge that you have now when you originally made ​​C ++ - What would you have done differently?
  2. What little popular/known language do you think deserves more love?
  3. I have heard that D is trying to implement the " language " that you often citereret to hiding in C ++ ( " Within C ++, there is a much smaller and cleaner language struggling two get out"), do you think that there is a truth to that statement ?

    Almost every new language would be a "C++" Killer. Almost every language wants to and tries to be "general purpose". Almost every language wants to try and be for "system programming". But that is difficult. C++ is in fact, not quite bad and is still being developed to cope with new problems and clear old problems and feel better. E.g. http://www.amazon.com/Tour-C--Depth/dp/0321958314/ref=asap_bc?ie=UTF8 And with approximately 4.4 million C++ programmers: http://blog.jetbrains.com/clion/2015/07/infographics-cpp-facts-before-clion/. Moreover, it is good that there are many programming languages. The world would be a boring place if there was only one. But, there is no language that is close to being the "little language stored in C++ that wants to get out" as I sometime dream about: http://www.stroustrup.com/hopl-almost-final.pdf

    Edit: Will update if there is any interest in it.
u/Crazy__Eddie · 2 pointsr/cpp

You forgot a 4th method of keeping threads from stomping on each other: immutable data.

This usually still requires some sort of reference counting mechanism if you're passing around this immutable data, but if its in global scope/lifetime even that's unnecessary. At any rate, that is pretty simple to facilitate and then basically ignore.

Never writing to shared data is my personal favorite way to deal with MT issues. In fact I like to push the fact that data is even shared behind a value object so different threads of execution look like they're working with independent values. Way easier to reason about that way.

Not always possible though. Sometimes it is just not the right answer. I find though that being as close to pure-functional as you can get is quite often the easiest and fastest approach. Making copies of everything all the time seems expensive, and for any one thread it is, but it often scales better than the alternatives.

I would also add that anyone wishing to get into MT in C++ should buy Wiliams's book. He does pretty good at explaining the kinds of issues you're talking about and showing what it takes to make a thread safe container interface...it is doable but they're pretty different from the non-safe versions.

u/kindkitsune · 2 pointsr/cpp

I think C++ Primer is nice, and I still keep it around at work as its a useful reference to have. Being able to open up to a section about a topic and know I'll find some reference info, example code, and some good exposition is great. It covers C++11 fairly well, too. Make sure to get the most recent edition. The book does a nice job of providing a decent amount of example code, and the included exercises are very useful.

Effective Modern C++ is great, once you have a bit more experience under your belt. I pull this one out all the time to take a quick look through it when I question how I'm using some feature, and the paradigms of "Modern C++" in general are just great to follow and fun to use.

The C++ Programming Language is a reference guide: its good for more advanced programmers who want a quick reference guide that also has a bit of exposition on various concepts/features (beyond what can be found on cppreference). I still don't think it would be well suited to you- it lacks the example code and useful exercises of the C++ Primer.

As you probably well know though, the best way to learn a programming language is to write in the language. Books are good for making sure you don't do outright "bad" things at first, and in that case I'd definitely recommend the C++ Primer. I had the problem of following online sites for my first C++ experiements, and these sites never used or mentioned any of the wonderful things C++ offers like the algorithm library (learn to love everything that offers!) or even something as basic as std::vector! Instead, I was using lots of raw calls to new and delete and doing other suboptimal things.

So, I'd say go with C++ Primer to start. Follow along like you would with a maths textbook and do the example problems, and transcribe and run much of the example code yourself.

Effective C++ would be next, to help you brush up on using various features of Modern C++ and better understanding small but vital details like constexpr and move semantics.

I started learning C++ in August of this year, so I still remember a lot of what it was like to start. Feel free to ask me more if you have any questions about other materials, websites, or resources.

u/HPCer · 1 pointr/cpp

When I started, the most memorable three resources I know I had were the following:

  • Bjarne's book - I don't think any C++ developer can truly call themselves even intermediate until they have absorbed at least half the content in the book. I started off with his 3rd edition, which is way less intimidating and shorter, but I subsequently ran through this entire book after it came out. There are no shortcuts on here - you need to read it.
  • Effective C++ 3rd Edition - I would almost require this one as it prevents any new C++ developer from getting caught in C++ gotchas. You should ideally follow this book up with his 4th edition afterwords. The reason why I recommended the 3rd first is because that book is much more newbie friendly. The 4th edition is targeted towards experienced C++ developers that already have had their feet wet with C++11/14 and want to figure out some best practices. Note the 3rd edition is for C++98 while the 4th is for C++11/14.

    After you're done with the two above required books, here are some useful readings:

  • What Every Programmer Should Know About Memory - This is an absolutely essential reading whether or not you've taken any systems courses. It's the foundation of what you will be programming towards (optimizing CPU cache usage).
  • 1024cores - I believe this guy works/worked at Google at one point, but his site is essential to understanding multi-threaded programming (which is essential in the field). Browse through his site and learn what you can.
  • Linux Kernel Development - Robert Love (who also works at Google) has probably written the most concise and understandable book on the Linux kernel I've ever read, and I've run through the Daniel Bovet's book and Michael Kirrisk's. For one thing, they're 1,000 and 1,500+ pages, respectively. Secondly, all I've found in those two books that I didn't find in Robert Love's is the implementation details in some areas as well as the details on the scheduler. Robert Love's incredible descriptions on the bottom-half/tasklets were already more than effective for normal understanding. I believe the latter books were more detailed in the networking areas as well, but in that case, you're better off with Understanding Linux Network Internals.

    The above readings will probably be a solid 6-12 months to read and absorb assuming you spend a couple hours a day, but I think it'll be well worth it in the long run since this type of stuff sticks with you for a long time. I read the above around 2013, and I can still talk about the CFS/other schedulers, software interrupts, and how the CPU cache works. It'll also make converting to other languages even more of a breeze because you'll know how everything works underneath the hood.
u/sempuki · 24 pointsr/cpp

It depends on whether you're a beginner to C++, a beginner to programming or both. It also depends on whether you prefer a tutorial style -- where you read closely and walk step by step with the author, or a reference -- where you skim, go at your own pace, and follow up when you need more details.

Accelerated C++ is more of a short introduction that hits all the broad strokes. It's good for someone who's already very adept but just needs to get into the mindset of C++.

Principles and practice is a tutorial style book suitable for an introductory course, and isn't a bad choice. The C++ Programming Language is more of a reference style and would be good for people who really prefer that direction.

I've read parts of How to Program Java and definitely was not impressed -- not sure how 9th ed of C++ stacks up.

I'm assuming a beginner is new to programming, but by virtue of choosing C++ enjoys the technical details that allows you to make the most of the language. My recommendation for this kind of user by far and away is C++ Primer by Lippmann, Lajoie, Moo (not to be confused with Primer Plus). This book (3rd ed) was what made me fall in love with the language in university.

It's written by people who were deeply involved in the standards, wrote actual compilers, and know how to present the material in ways that are relevant to the student. The 3rd ed also had sections that went further and explain the underlying compiler mechanism for a given feature which I found so insightful. They somehow managed to marry a high-level tutorial style narrative with important low level technical details that very much mirrors the style of the language itself. The 3rd ed also explicitly called out C++ as a mutli-paradigm language where functional style was possible (which was my first introduction to the concept of functional programming).

I'm not sure how much of that book survives in the 5th ed, but either way I recommend you read the book yourself and see if it's something that resonates for you. I'm looking through a copy of 5th ed right now, and it looks like much of that spirit is still alive. The down side is it appear it's still on strictly C++11, which given the size of the language and intended audience, I don't think is a fatal weakness.

If you want a complement to C++ Primer, Stroustrop's reference is the most complete, but to be honest I prefer C++ Reference for a working programmer.

I highly recommend ditching IDEs entirely for learners precisely because they make it harder to detect and learn from your mistakes. Get a copy of a linux distro, or install XCode command line tools, and invoke GCC/Clang directly. By the time you need to move into larger projects you'll have developed your own opinions on build systems/IDEs.

u/George3d6 · 2 pointsr/cpp

If you actually want to learn to implement efficient algorithms and data structure in C++ you might have a long road ahead of you since loads of them are quite complex. If you're interests are purely in machine learning than I would suggest you make use of the containers and algorithms provided by std and boost.

Going more domain specific and using things like armadillo or eigen. The later is used in many popular NN libraries/frameworiks such as tensorflow while the former is (based on my subjective opinion) quit easy to use, more similar to matlab and used in a number of libraries such as dlib and opencv. These "higher" level libraries are likely even better suited for your needs since they may help you use multiple cpus and gpus for your algorithms.

Further more, if you are interested in getting something shipped out quickly check out some C++ ML libraries, my personal favorite is Dlib but its quite limited in scope. However, I assume you wish to implement your own algorithm, in which case you are in luck because most of these libraries are open source:

https://github.com/tensorflow/tensorflow/tree/master/tensorflow
https://github.com/davisking/dlib
https://github.com/opencv/opencv
https://github.com/Somnibyte/MLKit

(are some examples of such libraries).

For familiarizing yourself with C++ I'd recommend:

-> so documentation

-> [Programming: Principles and Practice Using C++](https://www.amazon.com/dp/0321992784/?tag=stackoverfl08-20](https://www.amazon.com/dp/0321992784/?tag=stackoverfl08-20)

-> Effective Modern C++

Stack overflow documentation has plenty of examples that explain things which might otherwise seem strange about the language, Programming: Principles and Practice Using C++ was written by the creator of the language, Bjarne Stroustrup, who also happens to be a university teacher, so I would say it could be considered an objectively reasonable starting point for learning C++ for someone not very experienced with programming and Effective Modern C++, while aimed at programmers that are already experienced with C++, might give you a bit of insight into understanding why old codebases look the way they do and how to improve them and not repeat their mistakes (its also quite a well written book in many aspects, quite a pleasure to read).

Also I would avoid any C++ centric book on algorithms and data structures written pre 2011 like the plague, since the language has evolved a lot and you might find yourself learning a very old.

u/JonKalb · 28 pointsr/cpp

Modern C++ (C++11 or later) books are not nearly as plentiful as those for Classic C++, but there are a few notables.

Bjarne's college text may be what you are looking for:

Programming: Principles and Practice Using C++ https://www.amazon.com/Programming-Principles-Practice-Using-2nd/dp/0321992784/ref=pd_sim_14_2/144-7765085-0122037

It is aimed at engineers, which makes it less general, but might be good for you.

Of course his general intro is also updated to C++11.

The C++ Programming Language https://www.amazon.com/C-Programming-Language-4th/dp/0321563840/ref=pd_sim_14_2/144-7765085-0122037

This is aimed at experienced systems programmers, so it may be a bit heavy for students, which makes the Primer (that you mentioned attractive).

C++ Primer https://www.amazon.com/Primer-5th-Stanley-B-Lippman/dp/0321714113/ref=pd_bxgy_14_img_2/144-7765085-0122037

Be certain to get the 5th edition.

Of Scott's books only the latest is Modern.

Effective Modern C++ https://www.amazon.com/Effective-Modern-Specific-Ways-Improve/dp/1491903996/ref=pd_sim_14_2/144-7765085-0122037?_encoding=UTF8

This is less an introduction for students than for Journeymen (Journeypeople?) programmers.

For just plain good programming style consider Ivan's book.

Functional Programming in C++ https://www.amazon.com/gp/product/1617293814

Don't be put off by "Functional." This style of programming will make your students excellent programmers.

There are some modern books of high quality that are niche.

The ultimate guide to templates:
C++ Templates https://www.amazon.com/C-Templates-Complete-Guide-2nd/dp/0321714121/ref=pd_sim_14_1/144-7765085-0122037

The ultimate guide to concurrency:
C++ Concurrency in Action https://www.amazon.com/C-Concurrency-Action-Anthony-Williams/dp/1617294691/ref=pd_sim_14_1/144-7765085-0122037

Some library options:

Despite its name, this is mostly reference. A very good reference.
The C++ Standard Library: A Tutorial and Reference (2nd Edition) https://www.amazon.com/Standard-Library-Tutorial-Reference-2nd/dp/0321623215/ref=pd_sim_14_2/144-7765085-0122037

Arthur's book covers C++17, which makes it one of the most modern on this list:
Mastering the C++17 STL: Make full use of the standard library components in C++17 https://www.amazon.com/Mastering-17-STL-standard-components-ebook/dp/B076CQ1RFF/ref=sr_1_fkmrnull_1

To what extent are you teaching C++ and to what extent are you teaching programing?

Good luck and have fun!

u/yamamushi · 11 pointsr/cpp

I would supplement your class with one of the many great C++ books out there, because there are many ways to learn C++ but few of them are good (or even "right") ways.

You should be careful to distinguish between best practices from C++ and the new ones in C++11, and I've found that many courses tend to teach C++ as if it's just C with some extra features.

Of note, some really good books are:

u/elperroborrachotoo · 3 pointsr/cpp

Effective C++ / Effective STL by Scott Myers are a good starting point. They can be hard - if they are not, come back in a few months.

Marshal Cline's C++ FAQ is an assorted collection of everything in small bites. The book makes excellent toilet table material, though you have to piece together yourself the deeper insights that Effective X aims for.

Guru of the Week is a sometimes-dated but very well presented series of questions and answers, aiming at a wide range from beginner to, well, guru. The only drawback is that in C++11 and beyond, it's a bit different, or there are other / easier solutions.
Herb Sutter has started reviving the series

Code Complete gets half-a-recommendation. It is important material about programming in general, but for most people it's just too big. Anyway, the first edition can be acquired for pennies and is "good enough", so in case it doesn't work for you it could keep you warm for half an hour or so (lighter not included).

---

Other than that: I repeat the recommendation by /u/Heiroglyph to read and try to make sense of other people's code.

---

Side Note: My recommendations are intentionally non-game-programming related. Reason is^* I had quite a few run-ins with game programmers on Q&A sites and the like, and I'm left with the impression that they have a culture of sticking to their own puddle, but thinking it's the ocean. Certainly, game programming has some very particular problem that need very specific and sometimes awkward solutions, but that's no reason for isolaitonism.

^^*) ^^besides ^^the ^^obvious ^^"I ^^am ^^doing ^^too ^^little ^^game ^^programming ^^to ^^be ^^of ^^use ^^for ^^that"

u/hankovitch · 2 pointsr/cpp

I started from zero with "Programming: Principles and Practice in C++" "The C++ Programming Language". It's a nice book, when you are new to programming. (I wouldn't count Matlab.) It does not only teach C++, but many other more general programming concepts. My second book was "C++ Primer", which is fantastic if you are already a programmer or know C++ a bit. However they go quite fast trough many complex concepts.

When it comes to algorithms and data structures I'd recommend one of the classic textbooks like CLRS. Another nice book I found was this manual to competitive programming, which contains many implementations in C++.

You will properly understand C++ or algorithms and datastructures by reading though. You need to implement stuff. For this you can take a MOOC like Coursera's introduction to algorithms or consider pages like hackerrank which ask you to implement little things and provide test cases.

https://cses.fi/book.html

u/delarhi · 20 pointsr/cpp

I guess I'm going to go ahead and be "that guy".

Don't aim to work with a specific language.


I feel you should reframe your goal to be a "problem solver" that knows how to pick and use various tools to solve a problem. C++ may be one of those tools. Maybe C. Maybe Python. Maybe Java. You want to develop your skill set to be flexible enough to adopt the right tool for a job. Now, that's not to say you can't be a language expert. Language experts are very valuable and becoming one is a perfectly reasonable goal. That said, I think you'll find that you have many more opportunities when you remain flexible.

With that out of the way, I would say good next steps for continued C++ mastery are to read and understand Scott Meyers' excellent books:

u/redditEnergy · 10 pointsr/cpp

Here are several ways to get yourself started.


  • Read about the c++ core guidelines and Scott Meyer's Effective c++ book
  • The best way to read them without getting really bored or overwhelmed
    • Is 2 ways (Also this is my opinion)

  • Read the table of contents for each
    • Honestly just doing this is a valid tactic. Often when I'm bored I'll crack open the book/guidelines and browse the table of contents and be like "WOAH", "WHAT", "HUH"
  • Turn up ALL the warnings + more
    • I work in Visual Studio almost exclusively so check W4 and then combine it with Resharper (Google "resharper c++")
      You can use clang intelligence thanks to resharper to pick up on even more errors that will tell you that you should be using modern c++ practices. And if you use these flags
    • *,-cppcoreguidelines-*,-cppcoreguidelines-*,-google-*
    • clang -Wall -Wextra -Weverything -Wno-c++98-compat -Weffc++
      • Feel free to look these up / add more
    • You'll slowly start learning some modern c++ via just Visual Studio or Resharper or Clang yelling at you.
    • Also learning this way you can look up with resharper or with google why the thing you are doing is wrong / not modern.

  • Extra advice
    • Often you can just google "how to do X in modern c++"
    • Example "How to do random in modern c++"
      • And the top answer will generally get you someone saying something about <random>
      • From here based on the quality of the answer either trust them, or go find better documentation from either the above resources or from here: https://isocpp.org/
    • Look at other languages like Rust, Go, Jai
      • Example rust generics have better error messages than c++
      • How do you do this in c++?
      • Well the answer is in c++ 20
      • https://en.wikipedia.org/wiki/C%2B%2B20
      • I'll let you explore
      • But my main point is that by looking at new languages you can learn more about modern c++ by asking yourself "Can I do this in c++?". Often the answer is yes but the syntax is gross or in a newer standard. But better that is a heck of a lot better than nothing!
u/skebanga · 1 pointr/cpp

> even some "old but gold" ones are fine

The Scott Meyers book you mentioned, Effective C++, is just that: old but gold.

I'd also suggest you read his other books, Effective STL and More Effective C++.

These 3 books stand out amongst many for me, for their accessibility and effectiveness. It is worthwhile reading them now and getting a solid understanding on pre C++11 design principles etc.

Once his Effective C++11 book comes out, read that too!

Following these, but now moving from intermediate to expert level, the single biggest influence on how I designed and wrote C++ was Modern C++ Design by Andrei Alexandrescu.

It's pre C++11, but the insights into generic algorithm design using templates are just incredible.

Excerpt from the description on Amazon:

> Alexandrescu offers a cutting-edge approach to software design that unites design patterns, generic programming, and C++, enabling programmers to achieve expressive, flexible, and highly reusable code.

If there is ever one book I recommend people to read, it's this one.

u/SeanRamey · 3 pointsr/cpp

Honestly, if I may, suggest that you use C++ Primer as a reference book (not C++ Primer Plus, two different books).

Also, your voice is REALLY quiet in the video. It really needs to be boosted, a lot. If I turn my speakers up to where I can hear you normally, and then start anything else, I'll be blown away.

And I hope that your video is just a "demo" video, because if you start teaching a beginner C++ using structs and functions and console output, you are going to confuse them. You need to start from the beginning.

I would also teach them the basics of the command line and how to invoke the compiler and linker manually, and show them batch files and a super basic makefile. These are things that are very helpful to know and they are always skipped over in tutorials. Here is a makefile that I made that is really simple to use, fairly simple to understand, and has a decent set of features. Feel free to use it or distribute it. https://pastebin.com/qDTM1WNC

u/enzlbtyn · 8 pointsr/cpp

I'm a bit confused on your background with CS. You are you are aspiring to become a machine-learning researcher, yet evidently it doesn't seem like you have much of a background in CS which is why you're asking I assume. In any case, I'd recommend reading books on C++ and books on data structures/algorithms separately.

For algorithms/DS I recommend The Algorithm Design Manual and Introduction to Algorithms (commonly referred to as CLRS). Recommended books for C++ are on isocpp.org.

If you want to learn machine learning concepts and algorithms then I recommend some books on artificial intelligence and machine learning. To start with, Artificial Intelligence: A Modern Approach
then ISL. And/or potentially some associated MOOC courses, I recommend Learning from Data it's a really good course which teaches you fundamentals in machine learning such as learning theory and asks questions for why you can learn and etc.

In general, with all these books, you could possibly learn C++ by implementing their exercises or specific algorithms. Some examples would be basic CS related things binary search, sorting algorithms, heaps/priority queues and their associated implementations in the standard library. Then specific to Machine Learning you could implement decision trees and as an extension AdaBoost, a perceptron or a more generic neural network, and the list goes on.

u/Pseudohead · 2 pointsr/cpp

Not sure about Qt, but the book Accelerated C++ is often recommended for people with a programming background who want to learn C++ (such as in this Stack Overflow question about book recommendations.)

I'm currently working through this book and I can personally recommend it. On the upside:

  • It only spends a small amount of time going through the basics like variables and such.
  • As the Stack Overflow description mentions, it is relatively compact at 300 pages, so you won't have to wade through some two-volume behemoth before becoming familiar with the language.
  • It teaches the language in a "modern" style - unlike many C++ resources it does NOT take the approach of teaching C first (ie pointers and arrays, etc) - you'll be using Vectors and Strings and and other standard library classes quickly.

    On the downside it was released before C++11, so it doesn't cover any of the more modern features like auto, range-based for loops, lambda expressions etc. But you can always learn that stuff from some other resource - this book is still a great place to start in my opinion.
u/fthomas64 · 1 pointr/cpp

I really enjoyed this book:
Discovering Modern C++: An Intensive Course for Scientists, Engineers, and Programmers (C++ In-Depth)

https://www.amazon.com/Discovering-Modern-Scientists-Programmers-Depth/dp/0134383583

It's not a huge tome, which I consider to be a positive, but it shows how modern c++ can be used to solve real problems. Probably oriented towards engineering and scientific code, but that works for me.

It may be useful to have Stroustrup (C++ Programming Language) or C++ Primer (Lippman et al) as a thorough reference besides.

Also recommend C++ Templates (Vandevoorde, et al) but they are going to be releasing 2nd ed in a few months. I consider this to be the best template learning resource though.

u/Destroyah · 1 pointr/cpp

Accelerated C++ is an excellent recommendation. I would suggest quite the same thing, learn the basics before jumping into Boost. Accelerated C++ offers good, in-depth explanations of what's going on in the code, but not too mind numbingly deep that you get bored or can't understand it.

Boost::Asio is pretty good as far as a fairly mature socket and I/O library goes.

u/hewholaughs · 1 pointr/cpp

Awesome! This is the book right?

Doing tutorials was just the very first steps, but I'm interested in learning it in much better detail, thanks a lot!

u/cpp_dev · 3 pointsr/cpp

A handy book might be The C++ Standard Library: A Tutorial and Reference (2nd Edition).
As for something more visual experience I would recommend to watch Going Native 2012 and Going Native 2013 and maybe C9 Lectures: Stephan T. Lavavej - Core C++ then C9 Lectures: Stephan T Lavavej - Advanced STL. After you get a good understanding of new features will be good to read Effective Modern C++: 42 Specific Ways to Improve Your Use of C++11 and C++14, to understand how and when to use them even better.

u/[deleted] · 0 pointsr/cpp

I would recommend these two:

Discovering Modern C++

Effective Modern C++

Start with the Discovering Modern C++ and then move on to the Effective Modern C++. Effective Modern C++ is a must read, but it is very advanced, so take it slowly. I always keep it on my desk.

EDIT: This book is also a must if you are a sane person

EDIT2: I just noticed this: "Just looking for a hobby to do in the evenings and programming is something I'd be interested in." If you do not know how to program, pick some other language. It's no use to start with the 'hardest' one out there.

EDIT3: I hope you have thought this through, Op

u/TheSuperficial · 3 pointsr/cpp

Currently slated for end of the summer, but I'm sure Lippman's 5th edition of "C++ Primer" (not to be confused with Prata's "C++ Primer Plus") will be very good.

Looks like it's scheduled for end of the summer. I was hoping Lippman et. al. would put out a new version for C++11, but I wasn't sure until I saw it mentioned recently here on reddit.

u/Shokwav · 1 pointr/cpp

Would you recommend Effective Modern C++? I've been writing in C++ for 2-3 years now, and I've already read "Effective C++" and "More Effective C++" cover-to-cover, so I wouldn't consider myself a newbie... mainly, I'm just looking to learn multithreading, and I was considering a book such as this one.

u/EraZ3712 · 1 pointr/cpp

Consult The Definitive C++ Book Guide and List and pick a book. There is no better way to learn C++ than through a book. I personally recommend C++ Primer to learn the basics of modern C++, from functions and classes to templates, OOP, and the standard library.

After reading such a book, you have many options available. You can supplement your understanding afterwards by reading the Effective Series to establish good practices and follow idiomatic C++.

You can subscribe to isocpp.org for a wealth of material relevant to C++. You can watch videos from CppCon, C++Now (aka BoostCon), Meeting C++, ACCU, and many more talks that are on YouTube. Subscribe to cppchat, CppCast podcast, and Meeting C++ Live to hear about how and for what people are using C++.

Lastly, you can join the C++ IRC channels on freenode or the cpplang Slack team for discussions, arguments, teaching, learning, trolling, and everything about and not about C++ 24/7. If you have any questions along the way, you can ask in those channels, or over on /r/cpp_questions. And of course, you can subscribe to /r/cpp. :)

u/PSNB · 13 pointsr/cpp

Honestly, your best bet would probably be to read a textbook/reference on the language.

Stroustrup's "The C++ Programming Language" is quite good. If you want something more condensed, you could also check out his "A Tour of C++", which is much of the same material in a much smaller package.

u/acwaters · 4 pointsr/cpp

I would pick up both a data structures book and a C++ book; for instance, Data Structures and Algorithms in C++ and Programming: Principles and Practice Using C++.

Of course, you can use any data structures book you like; some are better than others, but they all teach the same stuff. But when you're learning the abstract stuff at the same time as basic programming, it can be nice to see examples in your language. Principles and Practice is one that I wholly recommend, though, as an excellent introduction to modern C++.

Also, be aware that there is way more bad C++ material out there than there is good C++ material. If in doubt, check out the semi-official book list or ask around here.

u/matthewaveryusa · 4 pointsr/cpp

I just looked through all my books. It's actually hard to find a book with large segments of good code. This is probably the worst book when it comes to good c++:

http://www.amazon.com/Numerical-Recipes-The-Scientific-Computing/dp/0521750334/ref=pd_sim_sbs_b_15

The best is probably scott meyer's effective c++. It gives small sections of good code and all 55 tips are gold (or silver)

http://www.amazon.com/dp/0321334876/ref=rdr_ext_tmb

u/cfeyer · 4 pointsr/cpp

I've heard good things about

Bjarne Stroustrup

Programming: Principles and Practice Using C++ (2nd Edition)

https://www.amazon.com/Programming-Principles-Practice-Using-2nd/dp/0321992784

Haven't read it, but I do have Stroustrup's more advanced "The C++ Programming Language" book and can tell you he's a great author.

u/Matemeo · 1 pointr/cpp

Highly recommend this book: https://www.amazon.com/Effective-Specific-Improve-Programs-Designs/dp/0321334876

Once Scott meyers has you hooked, checkout his modern effective c++ book. He's a great writer and teacher

u/StackedCrooked · 5 pointsr/cpp

If you want to have a more in-depth understanding of the topic I recommend that you to learn about the C++ memory model. The best resource I found is chapter 5 of the book C++ Concurrency in Action.

It's also helpful to learn about the MESI cache coherence protocol used by modern CPUs.

u/Gunslinging_Gamer · 1 pointr/cpp

Bjarne Stroustrup - Programming: Principles and Practice Using C++ (Amazon Link) would be my first recommendation.

It gives clear and detailed instruction right from the start. It's a lot of work, but it's well worth it. Buy a physical copy if you can; it's far better to work from a book.

u/Chrinkus · 8 pointsr/cpp

This is about where I'm at, building with CMake, testing with Catch, trying to use different libraries as often as I can.

I would add the following books:

  • A Tour of C++ (2nd ed) - The C++ Programming Language is exhaustive but unfortunately getting old. The original "Tour" was an excerpt fromTCPL but the second edition has C++17 and 20 additions. Its a nice supplement to the big beast.
  • Professional CMake - This is an excellent, modern book on how to use CMake.
u/EmergentBehavior · 9 pointsr/cpp

I picked up Accelerated C++ and it's, by far, one of the best books I've read. It's terse and provides an amazing amount of detail for its size.

Amazon

u/slei1337 · 7 pointsr/cpp

I recommend the book linked below (others probably already linked this one), I think there is an newer version out already. It covers beginner knowledge and also advanced high performance stuff like atomics and the memory models.


https://www.amazon.com/C-Concurrency-Action-Practical-Multithreading/dp/1933988770


Additionally once you have some knowledge some cppcon talks I found really interesting:
https://youtu.be/c1gO9aB9nbs
https://youtu.be/CmxkPChOcvw
https://youtu.be/X1T3IQ4N-3g

https://youtu.be/qKm-9gC4xpY
https://youtu.be/8_lhcZk5zEs

u/bstamour · 7 pointsr/cpp

If you're looking for books that contain info on auto, lambdas, and any other new C++11 stuff, you're going to have to wait a little bit, as the standard is still very new.

If you're looking to get started though, I would suggest something like Effective C++ which contains a bunch of specific things you can do to write better C++ code. For learning the language, something like Programming - Principles and Practices using C++: it's an intro to programming textbook that focuses entirely on C++. I know you're not a beginner ;) but I've heard really good things about that book.

u/batty_alex · 3 pointsr/cpp

Sorry, it was a lighthearted comment - I just read it in this book yesterday and thought I'd share :-D

If I understand correctly, you're correct, as far as the programmer is concerned, it will operate much like a header file. The tooling and compiler, however, won't have to do text inclusion on EVERYTHING.

I don't want to say anything I'd regret, my standard-ese isn't great, but it does look like, once everything is put together, you'd just replace #include <stdio.h> with import std.io, get intellisense that doesn't take 14 hours to read all your headers, eat up 8gb of RAM, and run your hard drive at 100% :-)

u/vihil · 1 pointr/cpp

There is also the follow-up More Effective C++ which I highly recommend as well.

u/ClockworkV · 4 pointsr/cpp

"Modern C++ Design" by https://www.reddit.com/user/andralex might not be quite so modern anymore, but it does a good job of presenting the basic building blocks for TMP, especially if you want to do complex stuff with types. Many of the things presented there have since gone into the standard, but it's good to know what goes on in the background.

u/cdglove · 11 pointsr/cpp

Anthony Williams' book, C++ Concurrency in Action is an excellent book. Everything from the basics of creating a thread to managing the memory order of atomic ops is discussed. It's expensive, but a really good read.

https://www.amazon.com/C-Concurrency-Action-Practical-Multithreading/dp/1933988770

u/haohaolee · 2 pointsr/cpp

hmm, do you know something about RAII? If not, go searching for that. And, I think all excellent C++ books would mention that, like this and this

u/CraigularB · 1 pointr/cpp

I'm surprised that the ship time for Tour is so long on Amazon (the link here says 1-2 months: https://smile.amazon.com/Tour-2nd-Depth-Bjarne-Stroustrup-dp-0134997832/dp/0134997832/ref=mt_paperback?_encoding=UTF8&me=&qid=1556289192 ). Does anyone have a better place to buy it from, or is there a newer edition that caused this? I could always read it online I guess instead of buying the book but I like having physical programming books for some things.

u/altano · 1 pointr/cpp

The C++ Programming Language, 4th Edition is the first C++ reference I've read that seems very trustworthy and I highly recommend it.

u/ShepardRTC · 1 pointr/cpp

This is a great book: http://www.amazon.com/gp/product/0321992784/

Is it fun? Sorta. But its a textbook. For learning computer programming. Is it Rails for Zombies? No.

u/Zweifuss · 7 pointsr/cpp

C++ Primer (https://www.amazon.com/Primer-5th-Stanley-B-Lippman/dp/0321714113/) as /u/sempuki mentioned.

It's clearly written and is really good at teaching you modern c++ concepts and conventions, while many other c++ books are actually "program c using c++" books.

u/t3amkill3r · 2 pointsr/cpp

Yes, you are right, this one is quite good.

u/jbakamovic · 24 pointsr/cpp

I can suggest to grab yourself a copy of C++ Templates: The Complete Guide. It's a great book.

u/cleroth · 2 pointsr/cpp

Scott Meyers has got some decent books. The latest one, Effective Modern C++ should be a great start to begin properly using the newer C++11/14.

u/lasthope106 · 2 pointsr/cpp

A good C++ class should teach you everything you need to be productive using the language, which in my opinion is everything in the book called Accelerated C++. Also it should have you do a non-trivial project every week, or large projects every 2 weeks. By the end of the class you should be well versed with OO, templates, and know your way around the standard library.

u/glimberg · 1 pointr/cpp

Not a tutorial but a book. It's a bit dated now as it was released far before C++11, but still a good reference.

http://www.amazon.com/Effective-STL-Specific-Standard-Template/dp/0201749629

u/kabbotta · 9 pointsr/cpp

If you already know the basics of programming, then the C++ Primer is also an excellent introduction. The 5th edition is updated to include C++11.

u/huike · 2 pointsr/cpp

I recommend you watch this video:

https://www.youtube.com/watch?v=xnqTKD8uD64

and read this book:

http://www.amazon.com/gp/product/0321958314/ref=ox_sc_act_title_3?ie=UTF8&psc=1&smid=ATVPDKIKX0DER

My personal advice to you is to just start programming. Pick a slightly ambitious project and work really hard on it, that's the best way to learn. Ignore people who tell you that there is only one way to write code and if you don't do it their way you're doing it wrong. Programming shouldn't be that complicated (and it doesn't have to be).

u/Idoiocracy · 4 pointsr/cpp

Thanks for the review. Your high esteem of it concurs with its #1 recommendation on the C++ FAQ.

Here is the US Amazon link for the book:

http://www.amazon.com/Primer-5th-Edition-Stanley-Lippman/dp/0321714113

u/nimtiazm · 2 pointsr/cpp

The C++ Programming Language (4th edition) by Bjorne Stroustrup is the de-facto C++ reference and understanding book. Hands down. Take a quick tour in earlier chapters and in depth references later in the book. If you’re an experienced programmer, it should start making sense to you pretty soon.

If you want another practical and feature-driven C++11 book then C++ Primer (5th Edition) https://www.amazon.com/dp/0321714113/ref=cm_sw_r_cp_api_17Luzb7M0HRNV should do it.

u/aveceasar · 2 pointsr/cpp

Another good book, starts a little bit easier on the newbie than Alexandrescu. Between the two of them you should be a template wizard in no time... :)

u/Sitezh · 6 pointsr/cpp

Someone who has come to the city first time needs a tour first. He must not get missed in details. So https://www.amazon.com/dp/0134997832/ref=cm_sw_r_cp_awdb_t1_FjjXCbC9VH5HS should be a good choice to start with.

u/LongUsername · 4 pointsr/cpp

You know there already is a second volume called "More Effective C++"?

u/legends2k · 2 pointsr/cpp

I can understand. My suggestion would be start high-level and once you're comfortable then go low. In fact, the practical advise also is to stay high-level as long as you don't have a need (like performance benchmark showing a bottleneck, etc.) to go low.

If you're a book reading person, C++ Primer is a good book.

u/pjmlp · 12 pointsr/cpp

Get Bjarne's latest book, "Tour of C++", it describes how to write modern safe C++.

http://www.amazon.com/Tour-In-Depth-Series-Bjarne-Stroustrup/dp/0321958314

u/BillyONeal · 36 pointsr/cpp

Folks interested in this should really look at Stepanov's EoP, which has the algorithms we actually use.

For example our implementation use the triple reverse version for random access iterators.

u/wanton08 · 4 pointsr/cpp

Discovering Modern C++ ? by Peter Gottschling. 1st edition: December 27, 2015

chap 5 is on meta-prrogramming technique:

  1. Let the Compiler Compute
  2. Providing and Using Type Information
  3. Expression Templates
  4. Meta-Tuning: Write Your Own Compiler Optimization
  5. Exercises
u/Alastair__ · 7 pointsr/cpp

I would recommend C++ Primer 5th Edition http://www.amazon.com/Primer-5th-Edition-Stanley-Lippman/dp/0321714113 to get up to speed with C++11 then probably Stroustrup afterwards.

u/GeneralMaximus · 11 pointsr/cpp

The newest edition of C++ Primer also covers C++11. I'd recommend reading that before reading TCPPPL. See http://www.amazon.com/Primer-5th-Stanley-B-Lippman/dp/0321714113

u/thisdudehenry · 1 pointr/cpp

after the beginning c++ through game programming do you recommend c++ primer or Programming: Principles and Practice Using C++ (2nd Edition https://www.amazon.com/dp/0321992784/?tag=stackoverfl08-20

u/__cplusplus · 2 pointsr/cpp

C++ Concurrency in Action by Anthony Williams talks about threads in detail (as well as mutexes, lock guards, and the C++ memory model). Here's an amazon link. Here's a pdf version : (note that you have to click the link under e-book to get the file) here.

u/1Bad · 1 pointr/cpp

A Tour of C++ comes highly recommended for beginners

u/last_useful_man · 1 pointr/cpp

For what it's worth Stroustrup has another C++ book, /to learn programming with/, ie it goes more gently and has more examples.

I indeed wouldn't try to learn programming with the 3rd edition main C++ book, but then I'm not sure I'd try to learn programming with C++, either (Python). He uses the linked book above to teach, it's probably suitable to learn from.

u/silveryRain · 7 pointsr/cpp

It's a book. Books are instruments that record, analyse, summarise, organise, debate and explain information; that are illustrated, non-illustrated, hardbound, paperback, jacketed, non-jacketed; with foreword, introduction, table of contents, index; that are intended for the enlightenment, understanding, enrichment, enhancement and education of the human brain through sensory route of vision - sometimes touch.

u/grout_nasa · 1 pointr/cpp

C++ Primer 5th edition is C++11, and uses it idiomatically throughout. Recommended. http://www.amazon.com/Primer-5th-Edition-Stanley-Lippman/dp/0321714113

u/okmijnuhb1 · 1 pointr/cpp

I've got that book too and I like the way it teaches things but it is definitely harder to understand initially than some other books. I suggest getting it along with another C++ book (I have SAMS Teach Yourself C++ in 21 Days) so that when you're having trouble with Accelerated C++ you can switch over to the other book and just read about a particular topic (such as pointers) and maybe go back to Accelerated C++ with a little more understanding.

u/bames53 · 7 pointsr/cpp

Not really.

If you're already familiar with basic programming and just want to get into C++ then: A Tour of C++. If you want to learn to program, and use C++ while doing so, then try Programming: Principles and Practice Using C++

u/Myrgy · 1 pointr/cpp

This c++17 book is good - http://www.cppstd17.com
I have another one about templates, but it's not aimed for begginners https://www.amazon.com/C-Templates-Complete-Guide-2nd/dp/0321714121. Nut I can't recommend it as a general start. And "concurrency in action" is a greate one!

u/zzing · 2 pointsr/cpp

One possibility (available on the 9th): http://www.amazon.com/The-Standard-Library-Tutorial-Reference/dp/0321623215/ref=dp_ob_title_bk

The only potential problem is that the author had an interview recently that put serious question on the quality of the work done. So I would wait and see. The present book is really good though.

u/OmegaNaughtEquals1 · 4 pointsr/cpp

I found Peter Gottschling's Discovering Modern C++ to be a very pragmatic introduction to C++11/14 features.

u/Fabien4 · 3 pointsr/cpp

Grab a copy of Accelerated C++ and give it a few hours. You should know whether C++ is for you.

u/TemplateRex · 5 pointsr/cpp

Books: First A Tour of C++ and then Effective Modern C++. Website: isocpp.org (it features many blogs, conference announcements, Stackoverflow questions regarding C++11/14).

u/junrrein · 11 pointsr/cpp

Or you can follow this book instead.

u/polkm · 2 pointsr/cpp

I got this book for learning c++11 http://www.amazon.com/Professional-C-Wrox-Guides/dp/0470932449/ref=sr_1_sc_1?s=books&ie=UTF8&qid=1333596913&sr=1-1-spell. Though some of the features of c++11 that they explain aren't in vs10 yet so i haven't been able to test them. The book goes over basic c++ too but you can just jump ahead to the juicy stuff.

u/rdit_cpp · 2 pointsr/cpp

Intro to Algorithms : Cormen

While the title is Introduction to Algorithms, this book covers data structures as well.

However, this book isn't explicitly targeted at C++ (I used it for C++ just fine).

The material is probably going to be difficult if this is the first time you've seen some of this. Don't let that turn you off.

u/lemontownship · 3 pointsr/cpp

> I will say that C++ is a very difficult language to pick up.

C++ is massive, being a three-decade accretion of features. Stroustrup's indispensable book, over 1300 dense pages, is only a succession of introductions to various aspects of the language. You often go to the web to get details.

u/os12 · 6 pointsr/cpp

If true, Alex's retirement would be sad, a big loss for the community. Here are a few pointers to his recent work:

u/scramjam · 7 pointsr/cpp

If that's what they suggested then they have no idea what they're talking about, not to mention that online C++ tutorials are notorious for being complete garbage. Get a reputable C++ beginners book, C++ Primer (NOT primer plus) if you want to learn C++ well.

u/srnull · 5 pointsr/cpp

Disgusting. Scott himself comes here to share news about his book, and this is the first reply he receives. I dislike the abundance of memes, but this is apt: "This is why we can't have nice things."

Perhaps it's been up for awhile at this point, but the book can now be preordered at Amazon. My preorder is in, just as it was for Bjarne's TC++PL 4th edition.

u/ForeverAlot · 7 pointsr/cpp

There are more bad sources of learning C++ on the Internet than there are good ones. I am not familiar with LearnCpp.com but looking at just a handful of its chapters it is misleading, out of date, violates a number of C++ idioms, and focused on the wrong things wrt. learning C++ specifically.

C++ Primer 5th ed. is a very good book for getting started with modern C++.

u/ruskeeblue · 1 pointr/cpp

If your into templates , and you can't find anything challenging, its time to start saving up those pennies and buy The C++ Standard Library , else your going to learn crap. Most folks buy it as a reference. I don't get contracts and you won't catch me without it. No money , no honey - and no jobs

u/doom_Oo7 · 7 pointsr/cpp

forget everything you learnt in college in programming. Your teachers are so full of shit it's not even funny. Read this book : https://www.amazon.com/Tour-C-Depth/dp/0321958314

u/aaronclong · 1 pointr/cpp

I am a little offended by your comment. It is very elitist and an attitude that is contributing to the slow and painful death of this language.

>If your into templates , and you can't find anything challenging, its time to start saving up those pennies and buy The C++ Standard Library , else your going to learn crap. Most folks buy it as a reference. I don't get contracts and you won't catch me without it. No money , no honey - and no jobs