[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Hvor er sstream i gcc? (C++)



Jeg har brug for std::ostringstream typen i et program, der kompileres med 
gcc 2.95.2. De eksempler jeg har set på brugen anvender include-direktivet:
#include <sstream>

Når jeg forsøger dette får jeg at vide at der ikke findes noget, der hedder 
sstream. Hvad gør man så?

Det drejer sig om, på en sikker måde, at få konverteret en heltals-værdi 
til en std::string. Jeg havde tænkt mig at benytte mig af dette:

______________________eksempel___________________________
#include <sstream>
#include <string>

std::string itos(int arg)
{
    std::ostringstream buffer;
    buffer << arg;
    return buffer.str(); 
}
______________________eksempel____________________________

Hvis nogen har en anden idé, hører jeg da også gerne om dette.

På forhånd tak.

-- 
Med venlig hilsen / Best regards
David List



 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 20:08 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *