[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
 

Re: [CPROG] Hvor er sstream i gcc? (C++)



David List <sslug@sslug> skrev den 14-May-01:

> 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>

Dit eksempel oversættes uden brok af min compiler (noget gcc
2.96-lignende fra Mandrake 8.0); jeg har ikke forsøgt at linke, da
eksemplet manglede en main().


Du kan evt. i stedet bruge den forældede (men til gengæld
understøttede) <strstream.h> header; sakset fra et af mine programmer:

	// Convert double to a string and return it
	char buf[30];
	ostrstream os(buf, sizeof(buf));
	os << v;
	return string(os.str(), os.pcount());

-- 
Stor hilsen -- Anders


 
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] *