I must be missing something here.
Code:
void Database_create(struct Connection *conn)
{
int i = 0;
int total_addresses_used;
printf("How many to store in this database?\n");
scanf("%d", &total_addresses_used);
for(i = 0; i < total_addresses_used; i++) {
printf("%d", i);
struct Address addr = {.id = i, .set = 0};
printf("119 debug.");
conn->db->rows[i] = addr;
}
printf("DEbug");
conn->db = realloc(conn->db, sizeof(struct Address) * total_addresses_used);
}
After running this function, after the value total_addresses_used is inputted, there is nothing. No debug output. Why is this hanging?
Bookmarks