I am having trouble reading the second matrix from my file. Can anyone help me please? Thank you!
vrga
0
Newbie Poster
Recommended Answers
Jump to PostWhat does the sample data in your file look like ?
Regarding your code, you need to be careful about the loop which is reading from your file. Unless your total number of records in the file is a multiple of 9 you will not read the values into …
Jump to PostJust how big are your matrices supposed to be? What is the input data. From your code, I see two sizes:
for (i =0; i<9; i++) { in >> num1 >> num2 >> num3; { RowA.push_back(num1); RowA.push_back(num2); RowA.push_back(num3); MatrixA.push_back(RowA); RowA.clear(); } } for(int i=0; i<3; i++) { …
All 5 Replies
stilllearning
148
Posting Whiz
vmanes
1,165
Posting Virtuoso
vrga
0
Newbie Poster
vmanes
1,165
Posting Virtuoso
vrga
0
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.