stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pegasus2000 <pegasus2...@email.it>
Subject RE: string concatenation trouble under Nanodesktop PSPE
Date Sat, 07 Jun 2008 00:34:02 GMT



Travis Vitek-4 wrote:
> 
>  
> 
> 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/string.cc'. 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.
> 
> Travis
> 
> 

Can you tell me how I can create a debug version of the library ?


-- 
View this message in context: http://www.nabble.com/string-concatenation-trouble-under-Nanodesktop-PSPE-tp17703255p17703762.html
Sent from the stdcxx-dev mailing list archive at Nabble.com.


Mime
View raw message