All Comments
TopTalkedBooks posted at March 10, 2018
If you know C, C++ Common Knowledge (https://www.amazon.com/Common-Knowledge-Essential-Intermedia...) will give you a quick run of the gotchas you're to avoid. From there, move to Scott Meyer's books, which will give you some good foundational knowledge on how features of the language work together. In particular I like that each concept is presented in a bite-sized chapter that you can read in a couple of hours and think about for the rest of the day. Even though the first two are about "classic C++" I wouldn't skip them. For a glimpse of the true power of modern C++, check the Boost Hana library docs, hopefully this will serve you as motivation to keep on going. Above all, don't do this alone. The compiler errors that you get once you start applying modern (template) techniques can be a bit of a rabbit hole and takes a bit to get an eye for deciphering them. Lean on coworkers, local user groups and/or the C++ slack group which is pretty supportive. Best of luck.
TopTalkedBooks posted at March 18, 2018

Meaning of a Const Member Function in C++ Common Knowledge: Essential Intermediate Programming gives a clear explanation:

The type of the this pointer in a non-const member function of a class X is X * const. That is, it’s a constant pointer to a non-constant X (see Const Pointers and Pointers to Const [7, 21]). Because the object to which this refers is not const, it can be modified. The type of this in a const member function of a class X is const X * const. That is, it’s a constant pointer to a constant X. Because the object to which this refers is const, it cannot be modified. That’s the difference between const and non-const member functions.

So in your code:

class foobar
{
  public:
     operator int () const;
     const char* foo() const;
};

You can think it as this:

class foobar
{
  public:
     operator int (foobar * const this) const;
     const char* foo(const foobar * const this) const;
};
Top Books
We collected top books from hacker news, stack overflow, Reddit, which are recommended by amazing people.