hi, essentially, my program needs to store an array of lists so that in main() it can have 2 run modes from the command line.
i.e. i can run the program with
to load a matrix into my array of lists
then use
to do something to the matrix I have just made (which is an array of lists)
i was going to create a global variable which was an array of lists but i need to know the size of it to declare it that way and I only know the size by running ./matrix load filename
Any ideas on how to go about this or other ways around it?
Cheers, Dan
P.S Dont ask why I am using an array of lists (but its pretty important that i do it that way)
i.e. i can run the program with
Code:
./matrix load filename
then use
Code:
./matrix find 1 3
i was going to create a global variable which was an array of lists but i need to know the size of it to declare it that way and I only know the size by running ./matrix load filename
Any ideas on how to go about this or other ways around it?
Cheers, Dan
P.S Dont ask why I am using an array of lists (but its pretty important that i do it that way)
Comment