Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void add_row(int ***matrix, int *rows_amount, int cols_amount)
- {
- printf("started\n");
- (*rows_amount)++;
- *matrix = (int**)realloc(*matrix, (*rows_amount) * sizeof(int*));
- *matrix[*rows_amount - 1] = (int*)malloc(cols_amount * sizeof(int));
- for (int j = 0; j < cols_amount; j++);
- *matrix[*rows_amount - 1][j] = 1;
- printf("ended\n");
- return;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement