I'm a Perl5 programmer for 7 years and I'm trying to learn C++ now. Some of the C++ syntax is hard for me to understand and to think in C++ way.
For example: In Perl, you can mix the data in the arrays
@array = (1,"string",5.355);
You can assign any value to a scalar variable:
$var = 1;
$var = "string";
$var = \$reference_to_scalar;
There are many examples.
A friend of mine recommend me the book "Thinking of C++" by Bruce Eckel, but I haven't any C background and it's hard for me to understand some things.
So my question is - could you recommend me a book for this situation. I don't want to learn C. I understand OOP (I'm getting more familiar with C++ oop aswell), I understand the point of the pointers (and some arithmetic) and references (widely used in Perl).
I don't need manuals for dummies (what is int
, bool
, double
, if
, while
), I just need a direction how to learn C++ from the perspective of a Perl programmer, because I'm sure that there are many like me.
Thank you in advance.
EDIT: Thank you for all the recommended books and the answers, I will try with "Accelerated C++". I will start from the beginning and try to change my mindflow to C++. I have added the "beginner" tag.