|
|
"Dimitri" <dimitri@xxxxxxxxxxxxx> wrote in message
news:es6va8$i4m$1@xxxxxxxxxxxxxxxxxxxxx
> for(vector<string>::iterator it = buffervec.begin(); it !=
> buffervec.end(); ++it)
> {
> qDebug("%s", it->c_str());
> dataBuffer.append(QString(*it));
> }
>
But he's doing:
qDebug("%s", ((string)(*it)).c_str());
dataBuffer.append(*it);
i.e. using a c style cast to cast *it to a string.
This is not necessary.
qDebug("%s",*it.c_str()); should work no?
But more probably the problem, is the next
line where he's appending a std::string to a QString.
Does that actually work?
Maybe changing that to:
databuffer.append(*it.c_str()); would be better.
Or will this cause problems with nulls?
Well he said it was a text file but...
--
To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with
"unsubscribe" in the subject or the body.
List archive and information: http://lists.trolltech.com/qt-interest/
|
|