stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Travis Vitek" <>
Subject RE: string concatenation trouble under Nanodesktop PSPE
Date Sat, 07 Jun 2008 00:02:35 GMT

pegasus2000 wrote:
>Consider the following program:
>#include <nanodesktop.h>
>// of the string class which is part of the
>// Standard Template Library
>#include <string>
>#include <cstdlib>
>#include <iostream>
>using namespace std;
>// concat - return the concatenation of two strings
>string concat(string s1, string s2)
>   return s1 + s2;
>int main(int argc, char* pArgs[])
>    ndInitSystem ();
>    // create a string that is the sum of two smaller strings
>    cout << "string1 + string2 = "
>    << concat("string1 ", "string2")
>    << endl;
>The program crashes when executes s1+s2. 
>I need the stack trace at that point, so I can check in which 
>routine the trouble is localized.

I have no way to tell where the program is crashing so I can't really
give you much more information. All I can tell you is that most of the
string functionality is implemented in `include/string' and
`include/'. But you already knew that, right?

BTW, it seems to me that it would make debugging much simpler if you had
built a debug version of the libraries for the PC. Then you could take
the code that fails on the PSP and step into it on the PC.


View raw message