[Qt-interest] QString::toStdString() problem

hakiim the dream hakiim35 at hotmail.com
Mon Mar 8 13:19:39 CET 2010


hello, yes, splitAndMerge works well, thanks for the other suggestion.its strange that it works now while initializing the string pointer using srcFilename = new string(s.toStdString());but it does not work while creating a string object with toStdString, e.g., string str = s.toStdString(); or string str(s.toStdString());Actually, after I have the pointer set, i want to set its value to another string member of another class. I think can also do it by myOtherClass->setSrcFileName(s.toStdString()); and the structure of the setSrcFileName method isvoid myOtherClass::setSrcFileName(string fname){	srcfilename = fname;}Inside that method, the debugger raises an exception like "A buffer overrun has occurred in blabla.exe which has corrupted the program's internal state. Press Break to debug the program or Continue to terminate the program."Any idea about this?  		 	   		  
_________________________________________________________________
Yeni Windows 7: Gündelik işlerinizi basitleştirin. Size en uygun bilgisayarı bulun.
http://windows.microsoft.com/shop
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100308/b92dd829/attachment.html 


More information about the Qt-interest-old mailing list