Code::Blocks Forums

User forums => Help => Topic started by: jose on August 30, 2011, 06:40:36 pm

Title: why std::string dont work in a gui aplication?
Post by: jose on August 30, 2011, 06:40:36 pm
Hello I installed CB with borland compiler bcc55.I have tested the string class of STL in a console application, and works without problems, however, when using the string class in a Windows GUI application, though the compilation does not present errors, something goes wrong, the application does not runs, and displays the message: Process terminated with status -1073741819 (0 minutes, 3 seconds). anyone have any idea how to solve this? thanks

more precisely ,if i create std::string("mystring"); now problem.
if i do that- std::string a; -line ok
                a.resize(20);  -there is a problem
if i create a empty string, after i cant do nathing with
Title: Re: why std::string dont work in a gui aplication?
Post by: zabzonk on August 30, 2011, 10:18:50 pm
Any number of reasons, none of which have anything to do with Code::Blocks.

But why in gods name are you using the Borland compiler? Get  a proper C++ compiler like GCC (see http://latedev.wordpress.com/2011/06/20/how-to-install-a-c-compiler-on-windows for how to install GCC). I use GCC and std::strings to write Windows applications with no problems whatsoever.
Title: Re: why std::string dont work in a gui aplication?
Post by: jose on August 30, 2011, 10:31:30 pm
thanks for the advice