The text in the if statement tutorial states if statements are terminated with end keyword. C++ if blocks are terminated with } , there is no end or endif in c++.
The text used in the tutorial for c++ comments, still refers to the lua style, -- and --[[ ]]-- Instead of // and /* */. The examples shown are correct its just the text descriptions that are incorrect.