The C++ API usually accept `string` arguments instead of `char*`, so the `c_str` here and in other places below becomes redundant.

You should also use the C++ constant `WINDOW_AUTOSIZE` instead of `CV_WINDOW_AUTOSIZE`.