Answer the question
In order to leave comments, you need to log in
How to write and read a 2D bool array using QTextStream from a file?
The >> and << operators need to be defined.
How am I trying to write
.....
stream << dataArrays;
.....
static QTextStream& operator << (QTextStream& stream, const BoolModel mData[4])
{
for(int k = 0; k < 4; k++)
{
auto data = mData[k].data();
stream << "\n";
for(int i = 0; i < (int)data.size(); i++)
for (int j = 0; j < (int)data[0].size(); j++)
{
stream << data[i][j] << " "; // где data[i][j] - значение bool
}
stream << "\n";
}
return stream;
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question