uchar* ptr = (uchar*) (img->imageData + y * img->widthStep); Namely: = (type*) (...);
Cast to type pointer to type . In the old, c-shny style.
static_cast or dynamic_cast , for example - VladDreinterpret_cast . - αλεχολυτreinterpret_cast . But this suggests that the types are completely incompatible. Ideally, if static_cast enough. const_cast and dynamic_cast too specific; Of course, this ghost may replace them - but at the same time, everything becomes completely unsafe ... - HarrySource: https://ru.stackoverflow.com/questions/611796/
All Articles