<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://programmingexamples.net/w/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://programmingexamples.net/w/index.php?action=history&amp;feed=atom&amp;title=CPP%2FTemplate_Print</id>
		<title>CPP/Template Print - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://programmingexamples.net/w/index.php?action=history&amp;feed=atom&amp;title=CPP%2FTemplate_Print"/>
		<link rel="alternate" type="text/html" href="http://programmingexamples.net/w/index.php?title=CPP/Template_Print&amp;action=history"/>
		<updated>2026-04-25T10:44:12Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.23.5</generator>

	<entry>
		<id>http://programmingexamples.net/w/index.php?title=CPP/Template_Print&amp;diff=306&amp;oldid=prev</id>
		<title>FirstPerson: Created page with '&lt;source lang = &quot;cpp&quot;&gt;  #include &lt;iostream&gt; #include &lt;string&gt;  namespace Print { 	using std::cout; 	using std::endl; 	using std::string;  	template&lt;typename T&gt; 	void print(const T…'</title>
		<link rel="alternate" type="text/html" href="http://programmingexamples.net/w/index.php?title=CPP/Template_Print&amp;diff=306&amp;oldid=prev"/>
				<updated>2010-07-05T21:58:15Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;#039;&amp;lt;source lang = &amp;quot;cpp&amp;quot;&amp;gt;  #include &amp;lt;iostream&amp;gt; #include &amp;lt;string&amp;gt;  namespace Print { 	using std::cout; 	using std::endl; 	using std::string;  	template&amp;lt;typename T&amp;gt; 	void print(const T…&amp;#039;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;source lang = &amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;iostream&amp;gt;&lt;br /&gt;
#include &amp;lt;string&amp;gt;&lt;br /&gt;
&lt;br /&gt;
namespace Print&lt;br /&gt;
{&lt;br /&gt;
	using std::cout;&lt;br /&gt;
	using std::endl;&lt;br /&gt;
	using std::string;&lt;br /&gt;
&lt;br /&gt;
	template&amp;lt;typename T&amp;gt;&lt;br /&gt;
	void print(const T&amp;amp; arg){&lt;br /&gt;
		cout &amp;lt;&amp;lt; arg;&lt;br /&gt;
	}&lt;br /&gt;
	void print(){&lt;br /&gt;
		cout &amp;lt;&amp;lt; endl;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	template&amp;lt;&amp;gt;&lt;br /&gt;
	void print(const bool&amp;amp; b){&lt;br /&gt;
		cout &amp;lt;&amp;lt; (b ? &amp;quot;TRUE&amp;quot; : &amp;quot;FALSE&amp;quot; );&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	template&amp;lt; typename T&amp;gt;&lt;br /&gt;
	void println(const T&amp;amp; arg){&lt;br /&gt;
		cout &amp;lt;&amp;lt; arg &amp;lt;&amp;lt; endl;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	void println(){&lt;br /&gt;
		cout &amp;lt;&amp;lt; endl;&lt;br /&gt;
	}&lt;br /&gt;
	template&amp;lt;&amp;gt;&lt;br /&gt;
	void println(const bool&amp;amp; b){&lt;br /&gt;
		cout &amp;lt;&amp;lt; (b ? &amp;quot;TRUE&amp;quot; : &amp;quot;FALSE&amp;quot;) &amp;lt;&amp;lt; endl;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	template&amp;lt; typename FrwdItr &amp;gt;&lt;br /&gt;
	void print(FrwdItr begin, FrwdItr end, const string&amp;amp; sep){&lt;br /&gt;
		while(begin != end){&lt;br /&gt;
			cout &amp;lt;&amp;lt; *begin++ &amp;lt;&amp;lt; sep;&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
int main(){&lt;br /&gt;
&lt;br /&gt;
 using namespace Print;&lt;br /&gt;
&lt;br /&gt;
 println(true);&lt;br /&gt;
 println(false);&lt;br /&gt;
 string A[4] = {&amp;quot;this&amp;quot;,&amp;quot;is&amp;quot;,&amp;quot;a&amp;quot;,&amp;quot;string&amp;quot;};&lt;br /&gt;
 print(A,A+4,&amp;quot; &amp;quot;);&lt;br /&gt;
 print();&lt;br /&gt;
&lt;br /&gt;
 return 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>FirstPerson</name></author>	</entry>

	</feed>