Does anyone knows how to assigned directly the sqlite query result to a struct in C rather that assigning to its members one by one?
I have a table user_info with fields user_id, username, password. Also I have a struct st_user_info.
typedef struct st_user_info{
int userId;
char* userName;
char* password;
} T_USERINFO;
T_USERINFO tUserInfo[10];
I want my query result from sqlite3_step
to be assigned direcly to the struct tUserInfo[index]
. Is there a way
to achieve on this way?