federico-busato / Modern-CPP-Programming

Modern C++ Programming Course (C++03/11/14/17/20/23/26)

Home Page:https://federico-busato.github.io/Modern-CPP-Programming/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Code Fix in 05.Basic_Concepts_IV.pdf

liyixin123 opened this issue · comments

Hello Federico,
On page 46, when I run the example , after *c++, a is equal to 3 instead of 4. I'm not sure if this is due to my mistake or not.

829FB6E0-0F20-4b71-BDE8-DC3CCF14872E

Hi @liyixin123, you are right. I forgot the parenthesis for (*c)++. I will replace post-increment with pre-increment to avoid confusion
image