You can make c++ work exactly like MATLAB (see answer above), but it doesn't make too much sense. A very good indication for that is your test case itself:
draw('shape','square','width',3,'hight',4); // should draw a square
You misspelt height. In my usual code you would be getting (runtime) warning of "unknown specifier hight" and having 4 ignored in favor of default value or perhaps doing nothing. And this warning is here only because I bother writing it in otherwise block. A lot of coworkers' code doesn't, and would just silently use default value or not do anything.
Now try debugging that in the middle of a complicated find some elements on image function - you wouldn't easily figure out it is a simple typo in your call to draw function.
So, instead of making Matlab code in c++, you should write something like:
void MyDrawingFunct(Shape shape){
...}
void MyDrawingFunct(Curve curve){
...}
Where you would draw shapes you have defined (like square, circle etc), and another function for curves etc. Or, if you want to safeguard against say adding Ellipse to Shape and have it fail at runtime, you can have some more functions - ...(Square ...) etc.
The main benefit is that trying to call MyDrawingFunct with say Ellipsoid will immediately notify you of error (at compile time), while doing things your usual MATLAB way will have you wondering whether ellipsoid is not implemented or you just made a typo somewhere (like in your example). And you will hit that at runtime.