i****m 发帖数: 15 | 1 How to write a code to read the following matrix (in a .txt file):
R N A X M A
M E O Z T K
G D C C W R
K I A U C J
Q L C U R V
and store it in a 2D container, for example, a 2D vector:
vector< vector > CharMatrix;
Thanks a lot. | S*****n 发帖数: 227 | 2 看起来没有什么难度的事情啊?除了矩阵的信息也许需要先处理meta-data
读矩阵就 ifs >> std::skipws >> ch; 慢慢读吧,怎么了?
【在 i****m 的大作中提到】 : How to write a code to read the following matrix (in a .txt file): : R N A X M A : M E O Z T K : G D C C W R : K I A U C J : Q L C U R V : and store it in a 2D container, for example, a 2D vector: : vector< vector > CharMatrix; : Thanks a lot.
| d******g 发帖数: 27 | |
|