stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pegasus2000 <pegasus2...@email.it>
Subject string concatenation trouble under Nanodesktop PSPE
Date Fri, 06 Jun 2008 23:39:18 GMT


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. 

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


Mime
View raw message