Originally Posted by

**marcoesteves**
I'm learning C++, last years I used procedural languages (fortran, C) and Matlab. Everything is difficult until I know how to do.

I'll use your "miyagi tip" to try to figure out how it works.

I've tried first. I spend 2 hours after posting. To me it is not easy chaging programming paradigms, it's a different way of think.

I think that I got it.

Code:

Book l1("1231", "title", "nice Author", "Nice Publisher", 1, "blue", 1021, 10);
l1.setPrice(100);
string str1 = "blue";
if (str1.compare(l1.marker()) == 0)
{ cout << "the marker is blue" << "\n";
l1.setPrice(200);
}
else
l1.setPrice(400);