i've seen it nw and understood that it wont fail as you mentioned rather could make the maintenance difficult.
Printable View
i've seen it nw and understood that it wont fail as you mentioned rather could make the maintenance difficult.
Correct, the cast itself isn't what makes it fail - it is the lack of including the correct header-file. However, not including the correct header file does happen from time to time.
If you are using an ANSI-compliant C compiler, it shouldn't complain about casting from void * to any other type. If you do get a warning or error, it is most likely because you are compiling with a C++ compiler.
--
Mats
Thanks a lot for the detailed explanation....!