0
how can you read and store a matrix?!
read and store a matrix that contains char and double variables. i rly search it and try to write a code and everything fails. Someone have any ideas? in the same txt file i have more matrixes that have different number of rows and cols :( and the matrixes are splited by a sign/number, so please tell some source or smth to look for :) any tip is welcome. thx again
3 Answers
+ 3
I think with matrix you are only able to assign one datatype. I would suggest you to try multidimensional arrays or vectors, but still I doubt that it will be easy to fill them both with double and chars. You could easily use a structure variable to assign different things to it and store it.
+ 1
Tensa is absolutely right. Try creating a class datatype appropriate to your program and then store it in a vector. Or you could use multiple vectors and traverse them using a function. Or nest a vector in a vector. There are a lot of ways of doing this. Some more "correct" than others.
0
thank you for the suggestions :)