I write more and more C applications, and now I wonder something about casts. In C++, a dynamic cast is a very costly operation (for instance a down-cast), but I don’t even know for static one.
In C, I had to write something like that:
assert ( p ); /* p is void* */
int v = *(int*)p;
Is it a « C dynamic-cast »? Is it quite the same as the static_cast<int*>(p)
of C++? How much does it cost?
Thanks in advance.