我有一个 9x8 文本文件,字符之间没有空格。如何打开此文本并阅读它并将其放入带有字符的二维向量中?到目前为止我所拥有的是这个......
#include <iostream>
#include <fstream>
std::ifstream in_str("inputtxt.txt");
std::string line;
while (std::getline(in_str,line))
{}
std::vector<std::vector<std::string>> replacements;
我仍在尝试弄清楚如何设置它并将文件添加到向量中