Best products from r/Cplusplus

We found 29 comments on r/Cplusplus discussing the most recommended products. We ran sentiment analysis on each of these comments to determine how redditors feel about different products. We found 33 products and ranked them based on the amount of positive reactions they received. Here are the top 20.

Top comments mentioning products on r/Cplusplus:

u/dotslashzero · 2 pointsr/Cplusplus

> Thanks for the comprehensive reply.

No problem.

> I'm already familiar with the basics of computer architecture, although I could certainly stand to know more. If you know of any good medium-level textbooks on that, I'd appreciate it.

I learned computer architectures using this book (but with an earlier edition): http://www.amazon.com/Computer-Architecture-Fifth-Edition-Quantitative/dp/012383872X. I think this is the same book they use in MIT.

> I realize that this is the case notionally, but I've come across posts in various places on the internet that claim compiler optimizers will sometimes inline recursive functions up to some arbitrary compiler-dependent depth so that a single stack creation can handle a recursion depth up to that arbitrary count, making the performance difference between recursion and iteration much less significant for relatively small scales. Then there's also tail recursion optimization where the recursion can go arbitrarily deep without needing to increase the stack.

You said it yourself twice:

  • up to that arbitrary count
  • can go arbitrarily deep

    That is the thing, because it is arbitrary, the only way you will be able to tell is to look at the compiled code and check if the recursion/iterative loop was optimized as you expect it to. Compilers have many levels of optimization. There is compile time optimization, which we are all familiar with. There is also link time optimization where optimization happens during link stage. There is also a technique performed by LLVM where the compiler creates an intermediate language bit code then perform optimization during link time based on the generated bit code. I am sure there are other optimization stages/techniques that exist on other compilers. These different levels of optimization stages use varying criteria to judge how a code will be optimized. You will need to check the resulting binary, using the optimization switches of your choice, whether the compiler's technique is used or not.

    > The problem is that I don't have any authoritative sources on any of these optimizer techniques, so there might be lots of useful tricks that I'm not exploiting.

    To be honest, many of these things are learned more through experience. You are on the right track on being curious about what the compiler does (or specifically, how it optimizes code), but in most cases, you will probably learn them through your own experiments (e.g. getting curious about whether solution y works better than solution x, then doing it, and then profiling and verifying through the internet forums).

    > So I guess compiler documentation is where I need to look to find these things out?

    Cannot say that it isn't, but I doubt compiler manuals/documentation will talk about these things in detail. It is your best bet, but most likely, you will have to go through the source code of the compiler (if it is open source), or find some white papers talking about how such optimizations are achieved by the said compiler.
u/SharpstownBestTown · 1 pointr/Cplusplus

SFML Game Development

SFML Game development is super straight forward and simple, this book does a good job of breaking down some of the concepts you will learn in the other book I've listed and applying them with c++ and sfml. Having started with SDL and using both SFML and SDL extensively, SFML is definitely my favorite of the two.

Game Programming Patterns

Does a great job of explaining many of the common programming patterns used in and outside of game development, and it's a great piece to read if you're still conceptualizing how certain modules in your game will function at a high level.

Both are excellent books, and I believe will get you what you are wanting to learn.

Edit: Both books are written for those without extensive knowledge of their topics, the SFML book is written for much more novice c++ programmers, and the Patterns book is written for those with a little more experience. Even if you're familiar with many programming patterns, I'd consider the second book a great refresher course.

u/johnboy77 · 3 pointsr/Cplusplus

Scott Meyers is good -- check out Effective Modern C++. He has a training course, Overview of the New C++ -- I haven't taken it, but I've seen enough of his stuff to recommend him.

If you want more introductory C++ stuff, look at some of the online courses by Kate Gregory (some free trials available -- which might be good to assess if it's what you're looking for).

Once you get going, I'd recommend Sutter's Mill. In particular, check out his "Elements of Modern C++ style". There are also loads of videos online from CppCon (just google it).

But keep in mind that one limiting factor in your request is the "for C programmers" part. A big part of recent evolution of C++ has been getting rid of the need for core C features like pointers. By keeping the C angle, you may be anchoring yourself to the past.

And if you want to go that route anyway (ie keep the C angle), then there is less harm including some older stuff too. I really liked Bruce Eckel's Thinking in C++, which you can find online for free (it isn't quite ancient or modern).

u/wnavarre · 3 pointsr/Cplusplus

Ok. I would probably recommend A Tour of C++. It is a short book because it doesn't go on and on about stuff you already know, but is still friendly to C++ beginners.

EDIT: Read the description here <https://www.amazon.com/Tour-2nd-Depth-Bjarne-Stroustrup/dp/0134997832/ref=sr_1_1?ie=UTF8&qid=1527540269&sr=8-1&keywords=a+tour+of+C%2B%2B> and see if it describes what you want.

In particular:

> This guide does not aim to teach you how to program (for that, see Stroustrup’s Programming: Principles and Practice Using C++, Second Edition), nor will it be the only resource you’ll need for C++ mastery (for that, see Stroustrup’s The C++ Programming Language, Fourth Edition, and recommended online sources). If, however, you are a C or C++ programmer wanting greater familiarity with the current C++ language, or a programmer versed in another language wishing to gain an accurate picture of the nature and benefits of modern C++, you can’t find a shorter or simpler introduction than this tour provides.

u/shoalmuse · 17 pointsr/Cplusplus

If you aren’t very familiar with C++, my advice would be to admit it at the outset. Modern C++ is a huge, complicated (and often convoluted) language and they will be able to poke holes in your seeming expertise unless you admit it at the outset. I’ve interviewed people who claim to be a 9 out of 10, but if that is the case you should probably know most of the standard by heart.

That out of the way, I would say that Bjarne’s “Tour of C++” is a great read that can easily be done in a week (I did and I wasn’t cramming for an interview). It gives a nice introduction to modern C++ features for a well-versed programmer coming from another language:
https://www.amazon.de/Tour-C-Depth/dp/0321958314

u/dstrott · 1 pointr/Cplusplus

C++ In Easy Steps is a really good (and cheap) tutorial book for beginners and is good as a quick reference for basic concepts. It's like 200 pages, isn't dense, an Mike McGrath is great at explaining things simply. When I went back to C++ after years of using MATLAB, it was very useful to helping kickstart remembering how the language worked...

u/TanAndBlonde · 1 pointr/Cplusplus

That's a good answer. I'm so sick of all this "C++ is too hard as a first language" stuff I see everywhere. I learned C++ as my first language and it taught me how programming actually works. If you learned py thing first sure you could program easy, but you wouldn't have as strong a foundation on how your computer works. This book is what I used to learn, it will teach you most of what you need. It's a great book, one of the few textbooks I would would actually recommend. It assumes your starting out with C++ as your first intro to programming so it's perfect for you. Good luck

u/ProvenDantheman · 3 pointsr/Cplusplus

Posting this as a top level comment so people can see this without digging. Here are some of the resources I have used plus additional ones I've found that may be useful:

  • cplusplus.com - Goes over the basics, I've personally used this a lot.
  • learncpp.com - Goes more in depth with standard library functionality.
  • udemy - Here's a free C++ udemy course. Udemy is a great resource for learning languages and game engines.
  • Effective Modern C++ - Book - A great book that acts more of a reference to C++ functionality. It also goes over best practices.
  • The C++ Programming Language, 4th Edition - Book - A reference on the C++ programming language.
u/DeliciousSkooma · 1 pointr/Cplusplus

Sorry but there's no cheat sheet and no reasonable way of making one. C++ is a rather large and complex language laid atop C, which is effectively laid atop an assembly language, which is compiler manufacturer and target platform dependant.

The best way to learn C++, or any programming language for that matter, is to use it, learn from your mistakes, and of course researching and reading everything you can. And of course, have fun with it!


Many popular books exist covering C++ things. Here are a couple good starter ones, in my opinion:

u/redditEnergy · 3 pointsr/Cplusplus

If you still feel shaky about your skills maybe don't just jump into graphics programming just yet. A lot of resources for that assume you are a solid C/C++ programmer.

I recommend writing data structures as a good project. Write a class to encapsulate a dynamic array. Write a class to encapsulate a linked list. Write a class to encapsulate C strings. Basically, you should be able to look at the stl and write your own version of anything it provides.

For me the moment I realized I could create anything I wanted to was when I wrote a memory manager.

If you want to learn a graphics OpenGL isn't very beginner friendly to really understanding good graphics programming. All of my friends who are all graphics programmers who started with OpenGL wished they had started with DirectX11 instead. Trust me.

Choose DirectX11.

https://www.amazon.com/Introduction-3D-Game-Programming-DirectX/dp/1936420228/ref=pd_bxgy_14_img_2?_encoding=UTF8&pd_rd_i=1936420228&pd_rd_r=50K3BD8ZYD23XVR3EY7H&pd_rd_w=212SX&pd_rd_wg=xvCX3&psc=1&refRID=50K3BD8ZYD23XVR3EY7H

u/DOOMReboot · 3 pointsr/Cplusplus

I haven't gone through this particular series myself, but I've browsed through it and his (thebennybox - everything he makes is high quality) series on creating a software renderer, and they are fantastic!

https://www.youtube.com/watch?v=ss3AnSxJ2X8&list=PLEETnX-uPtBXP_B2yupUKlflXBznWIlL5

This is by far my favorite book:

https://www.amazon.com/Engine-Architecture-Second-Jason-Gregory/dp/1466560010

I'd recommend thebennybox's video series first, the book may not be quite as beginner-friendly.

u/Pseudohead · 1 pointr/Cplusplus

I started teaching myself C++ by following these video tutorials (and stopped after the book I ordered arrived). I found them pretty easy to follow. I've stumbled across plenty of other video series on YouTube during my travels too - maybe see what's out there, pick one and follow :-)

Also, this thread on StackOverflow recommends this book (Programming: Principles and Practice Using C++ (2nd Edition) for non-programmers who want to learn C++. I think paying for a book is not a bad idea, as the material will be put together thoughtfully and presented in a logical way.

C++ is not the most beginner-friendly of languages. If you find it too tricky once you start learning, there's no shame in putting it aside for now, learning something easier to begin with and coming back to it later. I've heard Python is a great language for beginners, and is used in the real world so it's not like you'll just be learning a "language for beginners" - you'll be learning a "real" language just like C++.

u/pattakosn · 5 pointsr/Cplusplus

I was also first a C programmer and only started learning cpp later. I have found this book to be excellent:

Accelerated Cpp book

it is intended to complete novices, which you are not. However I think it is still perfect for you because I think that it introduces Cpp the way it should be and not as a C extension. After you are comfortable with the std I would suggest you move to good practices books (effective c++ etc) and/or design patterns books

u/Dicethrower · 2 pointsr/Cplusplus

This is fairly basic stuff, so I'm not sure if you should be trying challenges if you're not ready to do it. No worries, everyone started somewhere.

A good way to start is to find a good C++ book and go through it until you're more comfortable attacking the problem. I started with Beginning C++ Game Programming by Michael Dawson (or amazon). Most books cover what you need in the just first few chapters and I'm pretty sure this one does that as well. Plus you get some insight in game development, which is always fun to do. If all else fails, always remember google is your friend.

That said, I kind of get the idea that, because it's a pastebin, this was posted by a teacher of some sorts. I feel even the smallest hint would give away too much and it wouldn't be much of a challenge/test if others did the work for you. Learning to program is all about figuring things out yourself. There's very little, besides common pitfalls, that someone can teach you more or equally effective, as opposed to just doing it yourself.

u/MoTTs_ · 9 pointsr/Cplusplus

If good is the priority, I recommend going straight to the source -- the guy who invented the language, Bjarne Stroustrup. You can buy it new for $35, or head to your local library and borrow it for free.

u/[deleted] · 1 pointr/Cplusplus

Thanks! I've worked with amateur JavaScript before (my first language), so my natural formatting might be off.

Also, I hate using goto but I haven't nailed down Classes and Headers. I got myself stuck and ended up using it anyway. My C++ teacher (who I only had for about 2 weeks at a "camp".) didn't go to in-depth about it so I'm kinda lost in some areas.

Thankfully, I have copies of this and this in iBooks on my iPod for reading in my spare time.

The commented "Signature" was where I built the design of what would be outputted, and is not any actual "Signature."

It's nice to get so much feedback from what I thought looked like a dead thread. :)

Thanks /r/Cplusplus!

*Edited for grammar.

u/intheweehours · 3 pointsr/Cplusplus

Real-time collision detection by Christer Ericson (https://www.amazon.com/Real-Time-Collision-Detection-Interactive-Technology/dp/1558607323) is pretty much the "go to reference", even for those of us who have written a fair bit of collision detection code.

It's pretty expensive in hardback form, but it's well worth the investment.

u/alkhatib · 2 pointsr/Cplusplus

I'll repeat what /u/Transputer said: You need a book.

Especially since you are learning C++ from scratch and it's your first language.

This book is written by the creator of the language, it's recently updated to cover the new additions by the C++11 and C++14 standard.

It's designed to teach first year university students programming in C++

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

Your other option is to learn Programming through another language that might have video lectures or tutorials (Java?) once you are familiar with the concepts you can pick up a smaller book and get acquianted with C++

Good luck.

u/avicenna_t · 3 pointsr/Cplusplus

C++ isn't really any "harder" than Java or C#, but there is a lack of good, modern learning materials for beginners.

I would suggest finding a textbook (like this).

cppreference,
Stack Overflow, and
cpp_questions
are good sites to bookmark.

u/TheBowtieClub · 3 pointsr/Cplusplus

Stroustrup's book is considered (one of) the best for beginners. Lots of exercises in every chapter.

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

u/-lq_pl- · 1 pointr/Cplusplus

It does not seem like a good resource to me. It assumes you already know a C-like language and it starts by complaining that C++ is an oversold language and we should all program in Basic. I am only exaggerating a little. It lacks the insight that people like Meyers, Sutter, Alexandrescu or Stroustrup provide. Better learn from the man himself: https://www.amazon.com/Tour-C-Depth/dp/0321958314