B
bob
Hi,
I'm working with an ofstream object and using it to print the contents
on an 100 * 100 matrix. i.e. lots of elements. the _matrix variable
below is defined as std::vector<std::string, std::string>
When I run the code below I see the TTK_LOG( our logging function) call
correctly outputting all the values in the matrix. However I never see
anything output to the ofstream. (there's other data put into the
ofstream object elsewhere and I correctly see that). However my matrix
data never makes it.... or at least of ofstream object has a problem
somewhere along the line.
void cvs_export_container::dump(std:fstream& os)
{
unsigned int x =0;
while (x < _matrix.size() )
{
unsigned int y=0;
while (y < _matrix[x].size())
{
os << _matrix[x][y] << _separator;
TTK_LOG("streamed: " << _matrix[x][y] << _separator
);
++y;
}
os <<"\n";
++x;
}
os.flush();
os.close();
Can anybody suggest what I should look for to fix the problem?
thanks much and have a nice day.
Graham
I'm working with an ofstream object and using it to print the contents
on an 100 * 100 matrix. i.e. lots of elements. the _matrix variable
below is defined as std::vector<std::string, std::string>
When I run the code below I see the TTK_LOG( our logging function) call
correctly outputting all the values in the matrix. However I never see
anything output to the ofstream. (there's other data put into the
ofstream object elsewhere and I correctly see that). However my matrix
data never makes it.... or at least of ofstream object has a problem
somewhere along the line.
void cvs_export_container::dump(std:fstream& os)
{
unsigned int x =0;
while (x < _matrix.size() )
{
unsigned int y=0;
while (y < _matrix[x].size())
{
os << _matrix[x][y] << _separator;
TTK_LOG("streamed: " << _matrix[x][y] << _separator
);
++y;
}
os <<"\n";
++x;
}
os.flush();
os.close();
Can anybody suggest what I should look for to fix the problem?
thanks much and have a nice day.
Graham