G
Gary Kuehn
Is Reserve guaranteed to allocate contiguous memory?
How safe is the following:
vector<char> vbuff;
int sz = numeric_limits<short int>::max();
// reserve contiguous memory IS THIS ALWAYS TRUE ?
vbuff.reserve(sz);
ifstream file;
try {
file.open(fname.c_str(), ios_base::in);
// first line should be the equity ticker identifiers
file.getline(&vbuff[0], sz);
Thanks
Gary
How safe is the following:
vector<char> vbuff;
int sz = numeric_limits<short int>::max();
// reserve contiguous memory IS THIS ALWAYS TRUE ?
vbuff.reserve(sz);
ifstream file;
try {
file.open(fname.c_str(), ios_base::in);
// first line should be the equity ticker identifiers
file.getline(&vbuff[0], sz);
Thanks
Gary