<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: C++ &#8212; Convert int to string</title>
	<atom:link href="http://notfaq.wordpress.com/2006/08/30/c-convert-int-to-string/feed/" rel="self" type="application/rss+xml" />
	<link>http://notfaq.wordpress.com/2006/08/30/c-convert-int-to-string/</link>
	<description>FAQ, Tips &#38; Tricks For Unix, Emacs And Other Useful Tools</description>
	<lastBuildDate>Fri, 23 Oct 2009 18:59:17 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: How to convert an int to a string in C++? (Also doubles, floats, etc&#8230;) &#171; Rhyous&#39;s 127.0.0.1 or ::1</title>
		<link>http://notfaq.wordpress.com/2006/08/30/c-convert-int-to-string/#comment-365</link>
		<dc:creator>How to convert an int to a string in C++? (Also doubles, floats, etc&#8230;) &#171; Rhyous&#39;s 127.0.0.1 or ::1</dc:creator>
		<pubDate>Fri, 23 Oct 2009 18:59:17 +0000</pubDate>
		<guid isPermaLink="false">https://notfaq.wordpress.com/2006/08/30/c-convert-int-to-string/#comment-365</guid>
		<description>[...] I found a comment on another guys blog that actually makes it work for any type such as double, float, etc.. It has this code using this template. http://notfaq.wordpress.com/2006/08/30/c-convert-int-to-string/ [...]</description>
		<content:encoded><![CDATA[<p>[...] I found a comment on another guys blog that actually makes it work for any type such as double, float, etc.. It has this code using this template. <a href="http://notfaq.wordpress.com/2006/08/30/c-convert-int-to-string/" rel="nofollow">http://notfaq.wordpress.com/2006/08/30/c-convert-int-to-string/</a> [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pablito900</title>
		<link>http://notfaq.wordpress.com/2006/08/30/c-convert-int-to-string/#comment-355</link>
		<dc:creator>pablito900</dc:creator>
		<pubDate>Thu, 19 Feb 2009 14:24:11 +0000</pubDate>
		<guid isPermaLink="false">https://notfaq.wordpress.com/2006/08/30/c-convert-int-to-string/#comment-355</guid>
		<description>What if I have to concatenate a string with an int using CComBSTR?</description>
		<content:encoded><![CDATA[<p>What if I have to concatenate a string with an int using CComBSTR?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dusanbole</title>
		<link>http://notfaq.wordpress.com/2006/08/30/c-convert-int-to-string/#comment-354</link>
		<dc:creator>dusanbole</dc:creator>
		<pubDate>Mon, 05 Jan 2009 01:54:30 +0000</pubDate>
		<guid isPermaLink="false">https://notfaq.wordpress.com/2006/08/30/c-convert-int-to-string/#comment-354</guid>
		<description>Thanks for sharing
this is elegant and simple solution</description>
		<content:encoded><![CDATA[<p>Thanks for sharing<br />
this is elegant and simple solution</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: היכרות ראשונה עם CPPCMS&#187; הבלוג של נדב ויניק</title>
		<link>http://notfaq.wordpress.com/2006/08/30/c-convert-int-to-string/#comment-351</link>
		<dc:creator>היכרות ראשונה עם CPPCMS&#187; הבלוג של נדב ויניק</dc:creator>
		<pubDate>Fri, 12 Sep 2008 07:36:21 +0000</pubDate>
		<guid isPermaLink="false">https://notfaq.wordpress.com/2006/08/30/c-convert-int-to-string/#comment-351</guid>
		<description>[...] פשוט! שחיפשתי בגוגל על המרה ממספר למחרוזת, הסתמכתי על תגובה של מישהו שכתב איך לדעתו C++ צריכה להיות כתגובה לפוסט של [...]</description>
		<content:encoded><![CDATA[<p>[...] פשוט! שחיפשתי בגוגל על המרה ממספר למחרוזת, הסתמכתי על תגובה של מישהו שכתב איך לדעתו C++ צריכה להיות כתגובה לפוסט של [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dhjdhj</title>
		<link>http://notfaq.wordpress.com/2006/08/30/c-convert-int-to-string/#comment-348</link>
		<dc:creator>dhjdhj</dc:creator>
		<pubDate>Mon, 21 Jul 2008 14:29:59 +0000</pubDate>
		<guid isPermaLink="false">https://notfaq.wordpress.com/2006/08/30/c-convert-int-to-string/#comment-348</guid>
		<description>I wonder why the implementation of std::string doesn&#039;t include automatic conversion from the standard primitives so that one could continue the pretense that C+ is really an OO language (grin)

Seriously though, 

one should be able to write

std::string foo = 123
or even

std:: string foo;
foo.ToInt(123);</description>
		<content:encoded><![CDATA[<p>I wonder why the implementation of std::string doesn&#8217;t include automatic conversion from the standard primitives so that one could continue the pretense that C+ is really an OO language (grin)</p>
<p>Seriously though, </p>
<p>one should be able to write</p>
<p>std::string foo = 123<br />
or even</p>
<p>std:: string foo;<br />
foo.ToInt(123);</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: rvernica</title>
		<link>http://notfaq.wordpress.com/2006/08/30/c-convert-int-to-string/#comment-343</link>
		<dc:creator>rvernica</dc:creator>
		<pubDate>Tue, 26 Feb 2008 18:04:13 +0000</pubDate>
		<guid isPermaLink="false">https://notfaq.wordpress.com/2006/08/30/c-convert-int-to-string/#comment-343</guid>
		<description>Thanks for the comment! 

We updated the entry and now we use a different name for the string variable, as &quot;str&quot; is also a member of &quot;stringstream.&quot;</description>
		<content:encoded><![CDATA[<p>Thanks for the comment! </p>
<p>We updated the entry and now we use a different name for the string variable, as &#8220;str&#8221; is also a member of &#8220;stringstream.&#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: thebirdiehaswings</title>
		<link>http://notfaq.wordpress.com/2006/08/30/c-convert-int-to-string/#comment-342</link>
		<dc:creator>thebirdiehaswings</dc:creator>
		<pubDate>Tue, 26 Feb 2008 03:56:44 +0000</pubDate>
		<guid isPermaLink="false">https://notfaq.wordpress.com/2006/08/30/c-convert-int-to-string/#comment-342</guid>
		<description>Hey. Great blog! 

One question though, why does the string variable have to be named str?
I tried a different variable name and surprisingly it doesn&#039;t work.</description>
		<content:encoded><![CDATA[<p>Hey. Great blog! </p>
<p>One question though, why does the string variable have to be named str?<br />
I tried a different variable name and surprisingly it doesn&#8217;t work.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: rvernica</title>
		<link>http://notfaq.wordpress.com/2006/08/30/c-convert-int-to-string/#comment-268</link>
		<dc:creator>rvernica</dc:creator>
		<pubDate>Tue, 03 Jul 2007 17:34:56 +0000</pubDate>
		<guid isPermaLink="false">https://notfaq.wordpress.com/2006/08/30/c-convert-int-to-string/#comment-268</guid>
		<description>Thanks for the comment!</description>
		<content:encoded><![CDATA[<p>Thanks for the comment!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: djvishnu</title>
		<link>http://notfaq.wordpress.com/2006/08/30/c-convert-int-to-string/#comment-267</link>
		<dc:creator>djvishnu</dc:creator>
		<pubDate>Tue, 03 Jul 2007 12:35:51 +0000</pubDate>
		<guid isPermaLink="false">https://notfaq.wordpress.com/2006/08/30/c-convert-int-to-string/#comment-267</guid>
		<description>btw, awesome blog. love every bit of it</description>
		<content:encoded><![CDATA[<p>btw, awesome blog. love every bit of it</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: djvishnu</title>
		<link>http://notfaq.wordpress.com/2006/08/30/c-convert-int-to-string/#comment-266</link>
		<dc:creator>djvishnu</dc:creator>
		<pubDate>Tue, 03 Jul 2007 12:34:55 +0000</pubDate>
		<guid isPermaLink="false">https://notfaq.wordpress.com/2006/08/30/c-convert-int-to-string/#comment-266</guid>
		<description>ah, finally a smart way of doing this! Thank you!

I&#039;m sick and tired of

			sprintf(buf, &quot;somestring_%i&quot;,counter++);
			string name(buf);

which neither generic, readable nor .. c++</description>
		<content:encoded><![CDATA[<p>ah, finally a smart way of doing this! Thank you!</p>
<p>I&#8217;m sick and tired of</p>
<p>			sprintf(buf, &#8220;somestring_%i&#8221;,counter++);<br />
			string name(buf);</p>
<p>which neither generic, readable nor .. c++</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: radu</title>
		<link>http://notfaq.wordpress.com/2006/08/30/c-convert-int-to-string/#comment-22</link>
		<dc:creator>radu</dc:creator>
		<pubDate>Fri, 13 Oct 2006 23:13:05 +0000</pubDate>
		<guid isPermaLink="false">https://notfaq.wordpress.com/2006/08/30/c-convert-int-to-string/#comment-22</guid>
		<description>Here&#039;s a more generic version:

&lt;strong&gt;#include &lt;sstream&gt;&lt;/strong&gt;

&lt;strong&gt;template &lt;class T&gt;
inline std::string to_string (const T&amp; t)
{
std::stringstream ss;
ss &lt;&lt; t;
return ss.str();
}&lt;/strong&gt;</description>
		<content:encoded><![CDATA[<p>Here&#8217;s a more generic version:</p>
<p><strong>#include &lt;sstream&gt;</strong></p>
<p><strong>template &lt;class T&gt;<br />
inline std::string to_string (const T&amp; t)<br />
{<br />
std::stringstream ss;<br />
ss &lt;&lt; t;<br />
return ss.str();<br />
}</strong></p>
]]></content:encoded>
	</item>
</channel>
</rss>
