Im making a program to manage a sparse matrix, i can add elements, print the columns or lines, etc.
In the beggining, i can use a text file with a matrix and go from there or start with a "empty matrix". Basically if the first thing i do is add a 4 to the position [3] [4] now i have a matrix with 3 rows and 4 columns with the all of the elements beings 0 except for the 4.
So basically, the matrix can change size as i add more values, if i add something to the position [5] [5] now the matrix has 5 rows and 5 columns.
I dont know how i do this, i know i cant initialize an array with no elements so i want to know how i do it so the array can change size.