how to read a file in c++ as vector of vector code example
Example: read file into vector
std::vector<char> vec;
if (FILE *fp = fopen("filename", "r"))
{
char buf[1024];
while (size_t len = fread(buf, 1, sizeof(buf), fp))
{
v.insert(vec.end(), buf, buf + len);
}
fclose(fp);
}