Most of explanations sound not very clear to me. For instance, regarding constness. It would be great to see more comments about given examples touching some basics for the people who, for instance, are trying to master C++ after C#, etc. I think it would be more efficient than addressing such people to other references, books...
Also, "you can also write (float)10 like float(10) isn't correct and makes it seem as if they're interchangable. I know some later text mentions the danger (eg (float) "danger"s) but by then the damage might be done
Most of explanations sound not very clear to me. For instance, regarding constness. It would be great to see more comments about given examples touching some basics for the people who, for instance, are trying to master C++ after C#, etc. I think it would be more efficient than addressing such people to other references, books...
isn't it subjective matter?
Every matter is subjective ;) We all express our thoughts and wishes.
Erm,
(float)10/2is not 2.5 coliru.stacked-crooked.com/a/77b57...Also, "you can also write
(float)10likefloat(10)isn't correct and makes it seem as if they're interchangable. I know some later text mentions the danger (eg(float) "danger"s) but by then the damage might be doneYes...! You are correct. But that is what my point is.
You shouldn't use C-style cast.
Use
newinstead ofmallocanddeleteinstead offree.There is malloc and free in C++ i.e.
std::mallocandstd::freerespectively.Hey man!
Thanks for pointing it out.
You should update the following as well.
done
Finally! This is exactly the article I have been looking for in the past year. Thank you for this!
Thanks, Dood...