Hey im trying to pass a struct by reference to change one of its variables inside the void function. There is my code:
im getting an error in execution because of ConnInfo declaration... do i have to allocate something?Code:typedef struct info_{ MYSQL* p_Conn; char* Host; char* User; char* Password; char* Database; }info; int main(){ .... info ConnInfo; Initiate_mysql(&ConnInfo); } void Initiate_mysql(info *ConnInfo){ (*ConnInfo).p_Conn = mysql_init(NULL); ... }