Hello All,
I'm using a C API (for MySQL) and there's some example code. What I don't understand is why the examples always typecast an int pointer to a char pointer, before assigning it to a void pointer. Here's an example:
Code:/* Extract From mysql.h */ typedef struct st_mysql_bind { ..................... void *buffer; /* buffer to get/put data */ ..................... } MYSQL_BIND;Does this typecast have any effect or purpose?Code:/* Extracts from Example */ MYSQL_BIND bind[3]; int int_data; bind[0].buffer = (char *)&int_data;
Thanks all.