Bytes






Last updated
Was this helpful?






Last updated
Was this helpful?
Was this helpful?
begin = jconfig.tellg();
jconfig.seekg(0, std::ios::end);
end = jconfig.tellg();
int n = end - begin; // n is 17
std::vector<unsigned char> cfg(std::istreambuf_iterator<char>{jconfig}, {});
n = cfg.size(); // n is 15begin = jconfig.tellg();
jconfig.seekg(0, std::ios::end);
end = jconfig.tellg();
int n = end - begin; // n is 17
std::vector<unsigned char> cfg(std::istreambuf_iterator<char>{jconfig}, {});
n = cfg.size(); // n is 15
buf = cfg.data();int n;
std::ifstream jconfig("jconfig.cfg", std::ios::binary);
//std::ifstream jconfig("jconfig.cfg");
std::streampos begin, end;
if (jconfig.is_open()) {
std::string line;
std::cout << "go";
begin = jconfig.tellg();
jconfig.seekg(0, std::ios::end);
end = jconfig.tellg();
n = end - begin;
const char* buf;
unsigned char* buffer;
jconfig.seekg(0, std::ios::beg);
std::vector<unsigned char> cfg(std::istreambuf_iterator<char>{jconfig}, {});
n = cfg.size();
buffer = cfg.data();
jconfig.seekg(0, std::ios::beg);
while (std::getline(jconfig, line)) {
std::cout << line;
buf = line.c_str();
}
}begin = jconfig.tellg();
jconfig.seekg(0, std::ios::end);
end = jconfig.tellg();
n = end - begin; // 47
const char* buf;
unsigned char* buffer;