Class hierarchy for Navigator is Navigation → OptionsDecorator → Car. In no place there is a Ferrari there.
It is not a Decorator pattern, it is example of code Decorator should replace.
Navigation has Ferrari as member and a getDescription() method which is inherited from Car. So I think that Navigation overrides the getDescription() by putting Ferrari->getDescription() + "with Navigation".
OOP is new to me, can you help me understand why i don't get "Ferrari with Navigation will cost ... " ?
Really thanks for the links, i picked the example from Wikibooks and I have no idea if it is a good reference to learn design patterns
Sorry, I did not noticed that navigation contains car pointer.
In your code this virtual string getDescription(){ is never called, as Car (type of pointer itself) does not have such member, so virtual string getDescription() const{ is called instead, and as your decorator class is derived from Car itself and do not change own _str member, it is outputted.
It looks incomplete. Very little is been told about what problem patterns solve, when to use them and when not to.
For example decorator is best used on classes with no or little data, as each decorator is derived from base class and contains its data, so Ferrari with navigation, car alarm and automatic transmission would have 4 std::string objects, only one of which are actually used.
I suggest to read Classic GoF book Design Patterns: Elements of Reusable Object-Oriented Software.
Also I can recommend Head First Design Patterns.
For quick reference you can use http://sourcemaking.com/