<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-571418932549516258</id><updated>2011-11-27T16:08:14.797-08:00</updated><category term='Template'/><category term='CObject'/><category term='AfxGetThread'/><category term='AfxGetApp'/><category term='MFC'/><category term='VC++'/><category term='c++'/><category term='Thread'/><category term='WinMain'/><category term='implementation of the template classes in .cpp file'/><category term='::Sleep(0)'/><category term='AfxWinMain'/><title type='text'>Chhoti Si Baat</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://chhotisibaath.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/571418932549516258/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://chhotisibaath.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>FEBIL CHACKO</name><uri>http://www.blogger.com/profile/08163864794794790326</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_FOFi1VkIX8w/Sr8FggpqIDI/AAAAAAAABMc/rRpEVpTsdgE/S220/IMG_2305.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>4</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-571418932549516258.post-6098677569659433338</id><published>2009-12-21T07:46:00.000-08:00</published><updated>2009-12-21T08:06:02.295-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='c++'/><category scheme='http://www.blogger.com/atom/ns#' term='Template'/><category scheme='http://www.blogger.com/atom/ns#' term='implementation of the template classes in .cpp file'/><title type='text'>How to do the definition of a template class in .h file and implementation of the template classes in .cpp file?</title><content type='html'>&lt;meta equiv="Content-Type" content="text/html; charset=utf-8"&gt;&lt;meta name="ProgId" content="Word.Document"&gt;&lt;meta name="Generator" content="Microsoft Word 11"&gt;&lt;meta name="Originator" content="Microsoft Word 11"&gt;&lt;link rel="File-List" href="file:///C:%5CDOCUME%7E1%5CADMINI%7E1%5CLOCALS%7E1%5CTemp%5Cmsohtml1%5C01%5Cclip_filelist.xml"&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;w:worddocument&gt;   &lt;w:view&gt;Normal&lt;/w:View&gt;   &lt;w:zoom&gt;0&lt;/w:Zoom&gt;   &lt;w:punctuationkerning/&gt;   &lt;w:validateagainstschemas/&gt;   &lt;w:saveifxmlinvalid&gt;false&lt;/w:SaveIfXMLInvalid&gt;   &lt;w:ignoremixedcontent&gt;false&lt;/w:IgnoreMixedContent&gt;   &lt;w:alwaysshowplaceholdertext&gt;false&lt;/w:AlwaysShowPlaceholderText&gt;   &lt;w:compatibility&gt;    &lt;w:breakwrappedtables/&gt;    &lt;w:snaptogridincell/&gt;    &lt;w:wraptextwithpunct/&gt;    &lt;w:useasianbreakrules/&gt;    &lt;w:dontgrowautofit/&gt;   &lt;/w:Compatibility&gt;   &lt;w:browserlevel&gt;MicrosoftInternetExplorer4&lt;/w:BrowserLevel&gt;  &lt;/w:WordDocument&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;w:latentstyles deflockedstate="false" latentstylecount="156"&gt;  &lt;/w:LatentStyles&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;style&gt; &lt;!--  /* Font Definitions */  @font-face 	{font-family:"MS Mincho"; 	panose-1:2 2 6 9 4 2 5 8 3 4; 	mso-font-alt:"ＭＳ 明朝"; 	mso-font-charset:128; 	mso-generic-font-family:modern; 	mso-font-pitch:fixed; 	mso-font-signature:-1610612033 1757936891 16 0 131231 0;} @font-face 	{font-family:Verdana; 	panose-1:2 11 6 4 3 5 4 4 2 4; 	mso-font-charset:0; 	mso-generic-font-family:swiss; 	mso-font-pitch:variable; 	mso-font-signature:536871559 0 0 0 415 0;} @font-face 	{font-family:"\@MS Mincho"; 	panose-1:2 2 6 9 4 2 5 8 3 4; 	mso-font-charset:128; 	mso-generic-font-family:modern; 	mso-font-pitch:fixed; 	mso-font-signature:-1610612033 1757936891 16 0 131231 0;}  /* Style Definitions */  p.MsoNormal, li.MsoNormal, div.MsoNormal 	{mso-style-parent:""; 	margin:0in; 	margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:12.0pt; 	font-family:"Times New Roman"; 	mso-fareast-font-family:"MS Mincho"; 	mso-fareast-language:JA;} h3 	{mso-style-next:Normal; 	margin-top:12.0pt; 	margin-right:0in; 	margin-bottom:3.0pt; 	margin-left:0in; 	mso-pagination:widow-orphan; 	page-break-after:avoid; 	mso-outline-level:3; 	font-size:13.0pt; 	font-family:Arial; 	mso-fareast-font-family:"MS Mincho"; 	mso-fareast-language:JA;} @page Section1 	{size:8.5in 11.0in; 	margin:1.0in 1.25in 1.0in 1.25in; 	mso-header-margin:.5in; 	mso-footer-margin:.5in; 	mso-paper-source:0;} div.Section1 	{page:Section1;} --&gt; &lt;/style&gt;&lt;!--[if gte mso 10]&gt; &lt;style&gt;  /* Style Definitions */  table.MsoNormalTable 	{mso-style-name:"Table Normal"; 	mso-tstyle-rowband-size:0; 	mso-tstyle-colband-size:0; 	mso-style-noshow:yes; 	mso-style-parent:""; 	mso-padding-alt:0in 5.4pt 0in 5.4pt; 	mso-para-margin:0in; 	mso-para-margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:10.0pt; 	font-family:"Times New Roman"; 	mso-ansi-language:#0400; 	mso-fareast-language:#0400; 	mso-bidi-language:#0400;} &lt;/style&gt; &lt;![endif]--&gt;    &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;The common procedure in C++ is to put class definition in a C++ header file and the implementation in a C++ source file. Then the source file is made part of the project, meaning compiled separately. But when we implement this procedure for template class, some compilation and linking problem will arise.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;u&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;1. Compilation &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;PROBLEM&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;Sample Code:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;Template Class Header File&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;// TestTemp.h&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;#ifndef _TESTTEMP_H_&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;#define _TESTTEMP_H_&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;template&lt;class&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;class TestTemp&lt;span style=""&gt;  &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;public:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;&lt;span style=""&gt;          &lt;/span&gt;TestTemp();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;&lt;span style=""&gt;             &lt;/span&gt;void SetValue( T obj_i );&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;&lt;span style=""&gt;             &lt;/span&gt;T Getalue();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;private:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;&lt;span style=""&gt;    &lt;/span&gt;&lt;span style=""&gt;      &lt;/span&gt;T m_Obj;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;};&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;#endif&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Template Class Source File&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;// TestTemp.cpp&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;#include "TestTemp.h"&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;TestTemp::TestTemp()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;void TestTemp::SetValue( T obj_i )&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;T TestTemp::Getalue()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;&lt;span style=""&gt;    &lt;/span&gt;return m_Obj;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;}&lt;/span&gt;&lt;span style="font-family: Verdana; color: maroon;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: Verdana;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;If you try to implement the template class like a normal class implementation as shown above, it will generate a set of compilation errors such as&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;i style=""&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: blue;"&gt;: error C2955: 'TestTemp' : use of class template requires template argument list &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;i style=""&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: blue;"&gt;: error C2065: 'T' : undeclared identifier&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;REASON&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;In this case, the compiler doesn’t know about the object type. So it will not compile.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;SOLUTION&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;To compile this class without any errors you need to put the template specific declaration in .cpp file also as shown below.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Sample Code:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Template Class Header File&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;// TestTemp.h&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;#ifndef _TESTTEMP_H_&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;#define _TESTTEMP_H_&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;template&lt;class&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;class TestTemp&lt;span style=""&gt;  &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;public:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;&lt;span style=""&gt;          &lt;/span&gt;TestTemp();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;&lt;span style=""&gt;             &lt;/span&gt;void SetValue( T obj_i );&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;&lt;span style=""&gt;             &lt;/span&gt;T Getalue();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;private:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; text-indent: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;&lt;span style=""&gt; &lt;/span&gt;T m_Obj;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;};&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;#endif&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: Verdana;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Template Class Source File&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;// TestTemp.cpp&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;#include "TestTemp.h"&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;template &lt;class&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;TestTemp&lt;t&gt;::TestTemp()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;template &lt;class&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;void TestTemp&lt;t&gt;::SetValue( T obj_i )&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;template &lt;class&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;T TestTemp&lt;t&gt;::Getalue()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;&lt;span style=""&gt;    &lt;/span&gt;return m_Obj;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;u&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;2. Linking&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;PROBLEM&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;With the above code, after resolving all the compilation error you may get some link errors while you create an object of this class in any file other than the &lt;i style=""&gt;TestTemp.cpp&lt;/i&gt; file.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;" lang="FR"&gt;Sample Code:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;" lang="FR"&gt;Client Source File&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;// Client.cpp&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;#include "TestTemp.h"&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;&lt;span style=""&gt;          &lt;/span&gt;:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;&lt;span style=""&gt;          &lt;/span&gt;TestTemp&lt;int&gt; TempObj;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;&lt;span style=""&gt;          &lt;/span&gt;:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-family: Verdana;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;i style=""&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: blue;"&gt;: error LNK2001: unresolved external symbol "public: __thiscall TestTemp&lt;int&gt;::TestTemp&lt;int&gt;(void)" (??0?$TestTemp@H@@QAE@XZ)&lt;/span&gt;&lt;/i&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: blue;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-family: Verdana;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;REASON&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;When the compiler does encounter a declaration of a TestTemp object of some specific type, e.g., &lt;i&gt;int&lt;/i&gt;, it must have access to the template implementation source. Otherwise, it will have no idea how to construct the TestTemp member functions. And if you have put the implementation in a source (TestTemp.cpp) file and made it a separate part of the project, the compiler will not be able to find it when it is trying to compile the client source file. And #including the header file (TestTemp.h) will not sufficient at that time. That only tells the compiler how to allocate for the object data, and how to build the calls to the member functions, not how to build the member functions. And again, the compiler won’t complain. It will assume that these functions are provided elsewhere, and leave it to the linker to find them. So, when it’s time to link you will get "unresolved references" to any of the Class member functions that are not defined "inline" in the class definition.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: Verdana;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;h3&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;SOULTION&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h3&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;There are different methods to solve this problem. You can select from any of these methods which is suitable for your application design.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;b style=""&gt;&lt;u&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;METHOD1:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;You can create the object of template class in the same file source file where it is implemented (TestTemp.cpp). So that there is no need to link the object creation code with its actual implementation in some other file. This will cause the compiler to compile these particular types, so the associated class member functions will be available at link time.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Sample Code:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Template Class Header File&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;// TestTemp.h&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;#ifndef _TESTTEMP_H_&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;#define _TESTTEMP_H_&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;template&lt;class&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;class TestTemp&lt;span style=""&gt;  &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;public:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;&lt;span style=""&gt;          &lt;/span&gt;TestTemp();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;&lt;span style=""&gt;         &lt;/span&gt;void SetValue( T obj_i );&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;&lt;span style=""&gt;         &lt;/span&gt;T Getalue();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;private:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; text-indent: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;T m_Obj;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;};&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;#endif&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;Template Class Source File&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;// TestTemp.cpp&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;#include "TestTemp.h"&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;template &lt;class&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;TestTemp&lt;t&gt;::TestTemp()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;template &lt;class&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;void TestTemp&lt;t&gt;::SetValue( T obj_i )&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;template &lt;class&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;T TestTemp&lt;t&gt;::Getalue()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;&lt;span style=""&gt;    &lt;/span&gt;return m_Obj;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;void TemporaryFunction ()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;&lt;span style=""&gt;    &lt;/span&gt;TestTemp&lt;int&gt; TempObj;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: Verdana;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;Client Source File&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-family: Verdana; color: maroon;"&gt;// Client.cpp&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-family: Verdana; color: maroon;"&gt;#include "TestTemp.h"&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-family: Verdana; color: maroon;"&gt;&lt;span style=""&gt;         &lt;/span&gt;:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-family: Verdana; color: maroon;"&gt;&lt;span style=""&gt;         &lt;/span&gt;TestTemp&lt;int&gt; TempObj;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-family: Verdana; color: maroon;"&gt;&lt;span style=""&gt;    &lt;/span&gt;&lt;span style=""&gt;     &lt;/span&gt;TempObj.SetValue( 2 );&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-family: Verdana; color: maroon;"&gt;&lt;span style=""&gt;   &lt;/span&gt;&lt;span style=""&gt;      &lt;/span&gt;&lt;span style=""&gt; &lt;/span&gt;int nValue = TempObj.Getalue();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-family: Verdana; color: maroon;"&gt;&lt;span style=""&gt;         &lt;/span&gt;:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-family: Verdana;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;No need to call this &lt;i style=""&gt;TemporaryFunction() &lt;/i&gt;function, it’s just to avoid link error.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;b style=""&gt;&lt;u&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;METHODE 2&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;You can #include the source file that implements your template class in your client source file.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Sample Code:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Template Class Header File&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;// TestTemp.h&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;#ifndef _TESTTEMP_H_&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;#define _TESTTEMP_H_&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;template&lt;class&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;class TestTemp&lt;span style=""&gt;  &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;public:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;&lt;span style=""&gt;          &lt;/span&gt;TestTemp();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;&lt;span style=""&gt;             &lt;/span&gt;void SetValue( T obj_i );&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;&lt;span style=""&gt;             &lt;/span&gt;T Getalue();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;private:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; text-indent: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;T m_Obj;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;};&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;#endif&lt;/span&gt;&lt;span style="font-family: Verdana; color: maroon;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Template Class Source File&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;// TestTemp.cpp&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;#include "TestTemp.h"&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;template &lt;class&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;TestTemp&lt;t&gt;::TestTemp()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;template &lt;class&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;void TestTemp&lt;t&gt;::SetValue( T obj_i )&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;template &lt;class&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;T TestTemp&lt;t&gt;::Getalue()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;&lt;span style=""&gt;    &lt;/span&gt;return m_Obj;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Client Source File&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;// Client.cpp&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;#include "TestTemp.h"&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;#include "TestTemp.cpp"&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;&lt;span style=""&gt;          &lt;/span&gt;:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;&lt;span style=""&gt;          &lt;/span&gt;TestTemp&lt;int&gt; TempObj;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;&lt;span style=""&gt;    &lt;/span&gt;&lt;span style=""&gt;      &lt;/span&gt;TempObj.SetValue( 2 );&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;&lt;span style=""&gt;    &lt;/span&gt;&lt;span style=""&gt;      &lt;/span&gt;int nValue = TempObj.Getalue();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;&lt;span style=""&gt;          &lt;/span&gt;:&lt;/span&gt;&lt;span style="font-family: Verdana; color: maroon;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-family: Verdana;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;b style=""&gt;&lt;u&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;METHODE 3&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;You can #include the source file that implements your template class (TestTemp.cpp) in your header file that defines the template class (TestTemp.h) and remove the&lt;span style=""&gt;  &lt;/span&gt;source file from the project, not from the folder.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Sample Code:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Template Class Header File&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;// TestTemp.h&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;#ifndef _TESTTEMP_H_&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;#define _TESTTEMP_H_&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;template&lt;class&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;class TestTemp&lt;span style=""&gt;  &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;public:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;&lt;span style=""&gt;          &lt;/span&gt;TestTemp();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;&lt;span style=""&gt;             &lt;/span&gt;void SetValue( T obj_i );&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;&lt;span style=""&gt;             &lt;/span&gt;T Getalue();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;private:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;&lt;span style=""&gt;    &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;&lt;span style=""&gt;    &lt;/span&gt;T m_Obj;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;};&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;#include "TestTemp.cpp"&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;#endif&lt;/span&gt;&lt;span style="font-family: Verdana; color: maroon;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Template Class Source File&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;// TestTemp.cpp&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;#include "TestTemp.h"&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;template &lt;class&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;TestTemp&lt;t&gt;::TestTemp()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;template &lt;class&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;void TestTemp&lt;t&gt;::SetValue( T obj_i )&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;template &lt;class&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;T TestTemp&lt;t&gt;::Getalue()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;&lt;span style=""&gt;    &lt;/span&gt;return m_Obj;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Client Source File&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;// Client.cpp&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;#include "TestTemp.h"&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;&lt;span style=""&gt;          &lt;/span&gt;:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;&lt;span style=""&gt;          &lt;/span&gt;TestTemp&lt;int&gt; TempObj;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;&lt;span style=""&gt;    &lt;/span&gt;&lt;span style=""&gt;      &lt;/span&gt;TempObj.SetValue( 2 );&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;&lt;span style=""&gt;    &lt;/span&gt;&lt;span style=""&gt;      &lt;/span&gt;int nValue = TempObj.Getalue();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="background: rgb(166, 166, 166) none repeat scroll 0% 0%; margin-left: 0.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana; color: maroon;"&gt;&lt;span style=""&gt;          &lt;/span&gt;:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/571418932549516258-6098677569659433338?l=chhotisibaath.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chhotisibaath.blogspot.com/feeds/6098677569659433338/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://chhotisibaath.blogspot.com/2009/12/how-to-do-definition-of-template-class_21.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/571418932549516258/posts/default/6098677569659433338'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/571418932549516258/posts/default/6098677569659433338'/><link rel='alternate' type='text/html' href='http://chhotisibaath.blogspot.com/2009/12/how-to-do-definition-of-template-class_21.html' title='How to do the definition of a template class in .h file and implementation of the template classes in .cpp file?'/><author><name>FEBIL CHACKO</name><uri>http://www.blogger.com/profile/08163864794794790326</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_FOFi1VkIX8w/Sr8FggpqIDI/AAAAAAAABMc/rRpEVpTsdgE/S220/IMG_2305.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-571418932549516258.post-7451905527440667089</id><published>2009-12-19T03:38:00.000-08:00</published><updated>2009-12-21T07:46:04.723-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='WinMain'/><category scheme='http://www.blogger.com/atom/ns#' term='AfxGetThread'/><category scheme='http://www.blogger.com/atom/ns#' term='AfxWinMain'/><category scheme='http://www.blogger.com/atom/ns#' term='MFC'/><category scheme='http://www.blogger.com/atom/ns#' term='AfxGetApp'/><title type='text'>MFC running procedure</title><content type='html'>&lt;meta equiv="Content-Type" content="text/html; charset=utf-8"&gt;&lt;meta name="ProgId" content="Word.Document"&gt;&lt;meta name="Generator" content="Microsoft Word 11"&gt;&lt;meta name="Originator" content="Microsoft Word 11"&gt;&lt;link rel="File-List" href="file:///C:%5CDOCUME%7E1%5CADMINI%7E1%5CLOCALS%7E1%5CTemp%5Cmsohtml1%5C01%5Cclip_filelist.xml"&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;w:worddocument&gt;   &lt;w:view&gt;Normal&lt;/w:View&gt;   &lt;w:zoom&gt;0&lt;/w:Zoom&gt;   &lt;w:punctuationkerning/&gt;   &lt;w:validateagainstschemas/&gt;   &lt;w:saveifxmlinvalid&gt;false&lt;/w:SaveIfXMLInvalid&gt;   &lt;w:ignoremixedcontent&gt;false&lt;/w:IgnoreMixedContent&gt;   &lt;w:alwaysshowplaceholdertext&gt;false&lt;/w:AlwaysShowPlaceholderText&gt;   &lt;w:compatibility&gt;    &lt;w:breakwrappedtables/&gt;    &lt;w:snaptogridincell/&gt;    &lt;w:wraptextwithpunct/&gt;    &lt;w:useasianbreakrules/&gt;    &lt;w:dontgrowautofit/&gt;   &lt;/w:Compatibility&gt;   &lt;w:browserlevel&gt;MicrosoftInternetExplorer4&lt;/w:BrowserLevel&gt;  &lt;/w:WordDocument&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;w:latentstyles deflockedstate="false" latentstylecount="156"&gt;  &lt;/w:LatentStyles&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;style&gt; &lt;!--  /* Font Definitions */  @font-face 	{font-family:Verdana; 	panose-1:2 11 6 4 3 5 4 4 2 4; 	mso-font-charset:0; 	mso-generic-font-family:swiss; 	mso-font-pitch:variable; 	mso-font-signature:536871559 0 0 0 415 0;}  /* Style Definitions */  p.MsoNormal, li.MsoNormal, div.MsoNormal 	{mso-style-parent:""; 	margin:0in; 	margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:12.0pt; 	font-family:"Times New Roman"; 	mso-fareast-font-family:"Times New Roman";} h3 	{mso-style-next:Normal; 	margin-top:12.0pt; 	margin-right:0in; 	margin-bottom:3.0pt; 	margin-left:0in; 	mso-pagination:widow-orphan; 	page-break-after:avoid; 	mso-outline-level:3; 	font-size:13.0pt; 	font-family:Arial;} @page Section1 	{size:8.5in 11.0in; 	margin:1.0in 1.25in 1.0in 1.25in; 	mso-header-margin:.5in; 	mso-footer-margin:.5in; 	mso-paper-source:0;} div.Section1 	{page:Section1;} --&gt; &lt;/style&gt;&lt;!--[if gte mso 10]&gt; &lt;style&gt;  /* Style Definitions */  table.MsoNormalTable 	{mso-style-name:"Table Normal"; 	mso-tstyle-rowband-size:0; 	mso-tstyle-colband-size:0; 	mso-style-noshow:yes; 	mso-style-parent:""; 	mso-padding-alt:0in 5.4pt 0in 5.4pt; 	mso-para-margin:0in; 	mso-para-margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:10.0pt; 	font-family:"Times New Roman"; 	mso-ansi-language:#0400; 	mso-fareast-language:#0400; 	mso-bidi-language:#0400;} &lt;/style&gt; &lt;![endif]--&gt;&lt;meta equiv="Content-Type" content="text/html; charset=utf-8"&gt;&lt;meta name="ProgId" content="Word.Document"&gt;&lt;meta name="Generator" content="Microsoft Word 11"&gt;&lt;meta name="Originator" content="Microsoft Word 11"&gt;&lt;link rel="File-List" href="file:///C:%5CDOCUME%7E1%5CADMINI%7E1%5CLOCALS%7E1%5CTemp%5Cmsohtml1%5C01%5Cclip_filelist.xml"&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;w:worddocument&gt;   &lt;w:view&gt;Normal&lt;/w:View&gt;   &lt;w:zoom&gt;0&lt;/w:Zoom&gt;   &lt;w:punctuationkerning/&gt;   &lt;w:validateagainstschemas/&gt;   &lt;w:saveifxmlinvalid&gt;false&lt;/w:SaveIfXMLInvalid&gt;   &lt;w:ignoremixedcontent&gt;false&lt;/w:IgnoreMixedContent&gt;   &lt;w:alwaysshowplaceholdertext&gt;false&lt;/w:AlwaysShowPlaceholderText&gt;   &lt;w:compatibility&gt;    &lt;w:breakwrappedtables/&gt;    &lt;w:snaptogridincell/&gt;    &lt;w:wraptextwithpunct/&gt;    &lt;w:useasianbreakrules/&gt;    &lt;w:dontgrowautofit/&gt;   &lt;/w:Compatibility&gt;   &lt;w:browserlevel&gt;MicrosoftInternetExplorer4&lt;/w:BrowserLevel&gt;  &lt;/w:WordDocument&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;w:latentstyles deflockedstate="false" latentstylecount="156"&gt;  &lt;/w:LatentStyles&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;style&gt; &lt;!--  /* Font Definitions */  @font-face 	{font-family:Verdana; 	panose-1:2 11 6 4 3 5 4 4 2 4; 	mso-font-charset:0; 	mso-generic-font-family:swiss; 	mso-font-pitch:variable; 	mso-font-signature:536871559 0 0 0 415 0;}  /* Style Definitions */  p.MsoNormal, li.MsoNormal, div.MsoNormal 	{mso-style-parent:""; 	margin:0in; 	margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:12.0pt; 	font-family:"Times New Roman"; 	mso-fareast-font-family:"Times New Roman";} a:link, span.MsoHyperlink 	{color:blue; 	text-decoration:underline; 	text-underline:single;} a:visited, span.MsoHyperlinkFollowed 	{color:purple; 	text-decoration:underline; 	text-underline:single;} @page Section1 	{size:8.5in 11.0in; 	margin:1.0in 1.25in 1.0in 1.25in; 	mso-header-margin:.5in; 	mso-footer-margin:.5in; 	mso-paper-source:0;} div.Section1 	{page:Section1;} --&gt; &lt;/style&gt;&lt;!--[if gte mso 10]&gt; &lt;style&gt;  /* Style Definitions */  table.MsoNormalTable 	{mso-style-name:"Table Normal"; 	mso-tstyle-rowband-size:0; 	mso-tstyle-colband-size:0; 	mso-style-noshow:yes; 	mso-style-parent:""; 	mso-padding-alt:0in 5.4pt 0in 5.4pt; 	mso-para-margin:0in; 	mso-para-margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:10.0pt; 	font-family:"Times New Roman"; 	mso-ansi-language:#0400; 	mso-fareast-language:#0400; 	mso-bidi-language:#0400;} &lt;/style&gt; &lt;![endif]--&gt;&lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;meta equiv="Content-Type" content="text/html; charset=utf-8"&gt;&lt;meta name="ProgId" content="Word.Document"&gt;&lt;meta name="Generator" content="Microsoft Word 11"&gt;&lt;meta name="Originator" content="Microsoft Word 11"&gt;&lt;link rel="File-List" href="file:///C:%5CDOCUME%7E1%5CADMINI%7E1%5CLOCALS%7E1%5CTemp%5Cmsohtml1%5C01%5Cclip_filelist.xml"&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;w:worddocument&gt;   &lt;w:view&gt;Normal&lt;/w:View&gt;   &lt;w:zoom&gt;0&lt;/w:Zoom&gt;   &lt;w:punctuationkerning/&gt;   &lt;w:validateagainstschemas/&gt;   &lt;w:saveifxmlinvalid&gt;false&lt;/w:SaveIfXMLInvalid&gt;   &lt;w:ignoremixedcontent&gt;false&lt;/w:IgnoreMixedContent&gt;   &lt;w:alwaysshowplaceholdertext&gt;false&lt;/w:AlwaysShowPlaceholderText&gt;   &lt;w:compatibility&gt;    &lt;w:breakwrappedtables/&gt;    &lt;w:snaptogridincell/&gt;    &lt;w:wraptextwithpunct/&gt;    &lt;w:useasianbreakrules/&gt;    &lt;w:dontgrowautofit/&gt;   &lt;/w:Compatibility&gt;   &lt;w:browserlevel&gt;MicrosoftInternetExplorer4&lt;/w:BrowserLevel&gt;  &lt;/w:WordDocument&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;w:latentstyles deflockedstate="false" latentstylecount="156"&gt;  &lt;/w:LatentStyles&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;style&gt; &lt;!--  /* Font Definitions */  @font-face 	{font-family:Verdana; 	panose-1:2 11 6 4 3 5 4 4 2 4; 	mso-font-charset:0; 	mso-generic-font-family:swiss; 	mso-font-pitch:variable; 	mso-font-signature:536871559 0 0 0 415 0;}  /* Style Definitions */  p.MsoNormal, li.MsoNormal, div.MsoNormal 	{mso-style-parent:""; 	margin:0in; 	margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:12.0pt; 	font-family:"Times New Roman"; 	mso-fareast-font-family:"Times New Roman";} a:link, span.MsoHyperlink 	{color:blue; 	text-decoration:underline; 	text-underline:single;} a:visited, span.MsoHyperlinkFollowed 	{color:purple; 	text-decoration:underline; 	text-underline:single;} @page Section1 	{size:8.5in 11.0in; 	margin:1.0in 1.25in 1.0in 1.25in; 	mso-header-margin:.5in; 	mso-footer-margin:.5in; 	mso-paper-source:0;} div.Section1 	{page:Section1;} --&gt; &lt;/style&gt;&lt;!--[if gte mso 10]&gt; &lt;style&gt;  /* Style Definitions */  table.MsoNormalTable 	{mso-style-name:"Table Normal"; 	mso-tstyle-rowband-size:0; 	mso-tstyle-colband-size:0; 	mso-style-noshow:yes; 	mso-style-parent:""; 	mso-padding-alt:0in 5.4pt 0in 5.4pt; 	mso-para-margin:0in; 	mso-para-margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:10.0pt; 	font-family:"Times New Roman"; 	mso-ansi-language:#0400; 	mso-fareast-language:#0400; 	mso-bidi-language:#0400;} &lt;/style&gt; &lt;![endif]--&gt;  &lt;/p&gt;&lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;meta equiv="Content-Type" content="text/html; charset=utf-8"&gt;&lt;meta name="ProgId" content="Word.Document"&gt;&lt;meta name="Generator" content="Microsoft Word 11"&gt;&lt;meta name="Originator" content="Microsoft Word 11"&gt;&lt;link rel="File-List" href="file:///C:%5CDOCUME%7E1%5CADMINI%7E1%5CLOCALS%7E1%5CTemp%5Cmsohtml1%5C01%5Cclip_filelist.xml"&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;w:worddocument&gt;   &lt;w:view&gt;Normal&lt;/w:View&gt;   &lt;w:zoom&gt;0&lt;/w:Zoom&gt;   &lt;w:punctuationkerning/&gt;   &lt;w:validateagainstschemas/&gt;   &lt;w:saveifxmlinvalid&gt;false&lt;/w:SaveIfXMLInvalid&gt;   &lt;w:ignoremixedcontent&gt;false&lt;/w:IgnoreMixedContent&gt;   &lt;w:alwaysshowplaceholdertext&gt;false&lt;/w:AlwaysShowPlaceholderText&gt;   &lt;w:compatibility&gt;    &lt;w:breakwrappedtables/&gt;    &lt;w:snaptogridincell/&gt;    &lt;w:wraptextwithpunct/&gt;    &lt;w:useasianbreakrules/&gt;    &lt;w:dontgrowautofit/&gt;   &lt;/w:Compatibility&gt;   &lt;w:browserlevel&gt;MicrosoftInternetExplorer4&lt;/w:BrowserLevel&gt;  &lt;/w:WordDocument&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;w:latentstyles deflockedstate="false" latentstylecount="156"&gt;  &lt;/w:LatentStyles&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;style&gt; &lt;!--  /* Font Definitions */  @font-face 	{font-family:Verdana; 	panose-1:2 11 6 4 3 5 4 4 2 4; 	mso-font-charset:0; 	mso-generic-font-family:swiss; 	mso-font-pitch:variable; 	mso-font-signature:536871559 0 0 0 415 0;}  /* Style Definitions */  p.MsoNormal, li.MsoNormal, div.MsoNormal 	{mso-style-parent:""; 	margin:0in; 	margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:12.0pt; 	font-family:"Times New Roman"; 	mso-fareast-font-family:"Times New Roman";} a:link, span.MsoHyperlink 	{color:blue; 	text-decoration:underline; 	text-underline:single;} a:visited, span.MsoHyperlinkFollowed 	{color:purple; 	text-decoration:underline; 	text-underline:single;} @page Section1 	{size:8.5in 11.0in; 	margin:1.0in 1.25in 1.0in 1.25in; 	mso-header-margin:.5in; 	mso-footer-margin:.5in; 	mso-paper-source:0;} div.Section1 	{page:Section1;} --&gt; &lt;/style&gt;&lt;!--[if gte mso 10]&gt; &lt;style&gt;  /* Style Definitions */  table.MsoNormalTable 	{mso-style-name:"Table Normal"; 	mso-tstyle-rowband-size:0; 	mso-tstyle-colband-size:0; 	mso-style-noshow:yes; 	mso-style-parent:""; 	mso-padding-alt:0in 5.4pt 0in 5.4pt; 	mso-para-margin:0in; 	mso-para-margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:10.0pt; 	font-family:"Times New Roman"; 	mso-ansi-language:#0400; 	mso-fareast-language:#0400; 	mso-bidi-language:#0400;} &lt;/style&gt; &lt;![endif]--&gt;&lt;meta equiv="Content-Type" content="text/html; charset=utf-8"&gt;&lt;meta name="ProgId" content="Word.Document"&gt;&lt;meta name="Generator" content="Microsoft Word 11"&gt;&lt;meta name="Originator" content="Microsoft Word 11"&gt;&lt;link rel="File-List" href="file:///C:%5CDOCUME%7E1%5CADMINI%7E1%5CLOCALS%7E1%5CTemp%5Cmsohtml1%5C01%5Cclip_filelist.xml"&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;w:worddocument&gt;   &lt;w:view&gt;Normal&lt;/w:View&gt;   &lt;w:zoom&gt;0&lt;/w:Zoom&gt;   &lt;w:punctuationkerning/&gt;   &lt;w:validateagainstschemas/&gt;   &lt;w:saveifxmlinvalid&gt;false&lt;/w:SaveIfXMLInvalid&gt;   &lt;w:ignoremixedcontent&gt;false&lt;/w:IgnoreMixedContent&gt;   &lt;w:alwaysshowplaceholdertext&gt;false&lt;/w:AlwaysShowPlaceholderText&gt;   &lt;w:compatibility&gt;    &lt;w:breakwrappedtables/&gt;    &lt;w:snaptogridincell/&gt;    &lt;w:wraptextwithpunct/&gt;    &lt;w:useasianbreakrules/&gt;    &lt;w:dontgrowautofit/&gt;   &lt;/w:Compatibility&gt;   &lt;w:browserlevel&gt;MicrosoftInternetExplorer4&lt;/w:BrowserLevel&gt;  &lt;/w:WordDocument&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;w:latentstyles deflockedstate="false" latentstylecount="156"&gt;  &lt;/w:LatentStyles&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;style&gt; &lt;!--  /* Font Definitions */  @font-face 	{font-family:Verdana; 	panose-1:2 11 6 4 3 5 4 4 2 4; 	mso-font-charset:0; 	mso-generic-font-family:swiss; 	mso-font-pitch:variable; 	mso-font-signature:536871559 0 0 0 415 0;}  /* Style Definitions */  p.MsoNormal, li.MsoNormal, div.MsoNormal 	{mso-style-parent:""; 	margin:0in; 	margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:12.0pt; 	font-family:"Times New Roman"; 	mso-fareast-font-family:"Times New Roman";} @page Section1 	{size:8.5in 11.0in; 	margin:1.0in 1.25in 1.0in 1.25in; 	mso-header-margin:.5in; 	mso-footer-margin:.5in; 	mso-paper-source:0;} div.Section1 	{page:Section1;} --&gt; &lt;/style&gt;&lt;!--[if gte mso 10]&gt; &lt;style&gt;  /* Style Definitions */  table.MsoNormalTable 	{mso-style-name:"Table Normal"; 	mso-tstyle-rowband-size:0; 	mso-tstyle-colband-size:0; 	mso-style-noshow:yes; 	mso-style-parent:""; 	mso-padding-alt:0in 5.4pt 0in 5.4pt; 	mso-para-margin:0in; 	mso-para-margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:10.0pt; 	font-family:"Times New Roman"; 	mso-ansi-language:#0400; 	mso-fareast-language:#0400; 	mso-bidi-language:#0400;} &lt;/style&gt; &lt;![endif]--&gt;  &lt;/p&gt;&lt;meta equiv="Content-Type" content="text/html; charset=utf-8"&gt;&lt;meta name="ProgId" content="Word.Document"&gt;&lt;meta name="Generator" content="Microsoft Word 11"&gt;&lt;meta name="Originator" content="Microsoft Word 11"&gt;&lt;link rel="File-List" href="file:///C:%5CDOCUME%7E1%5CADMINI%7E1%5CLOCALS%7E1%5CTemp%5Cmsohtml1%5C01%5Cclip_filelist.xml"&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;w:worddocument&gt;   &lt;w:view&gt;Normal&lt;/w:View&gt;   &lt;w:zoom&gt;0&lt;/w:Zoom&gt;   &lt;w:punctuationkerning/&gt;   &lt;w:validateagainstschemas/&gt;   &lt;w:saveifxmlinvalid&gt;false&lt;/w:SaveIfXMLInvalid&gt;   &lt;w:ignoremixedcontent&gt;false&lt;/w:IgnoreMixedContent&gt;   &lt;w:alwaysshowplaceholdertext&gt;false&lt;/w:AlwaysShowPlaceholderText&gt;   &lt;w:compatibility&gt;    &lt;w:breakwrappedtables/&gt;    &lt;w:snaptogridincell/&gt;    &lt;w:wraptextwithpunct/&gt;    &lt;w:useasianbreakrules/&gt;    &lt;w:dontgrowautofit/&gt;   &lt;/w:Compatibility&gt;   &lt;w:browserlevel&gt;MicrosoftInternetExplorer4&lt;/w:BrowserLevel&gt;  &lt;/w:WordDocument&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;w:latentstyles deflockedstate="false" latentstylecount="156"&gt;  &lt;/w:LatentStyles&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;style&gt; &lt;!--  /* Font Definitions */  @font-face 	{font-family:Verdana; 	panose-1:2 11 6 4 3 5 4 4 2 4; 	mso-font-charset:0; 	mso-generic-font-family:swiss; 	mso-font-pitch:variable; 	mso-font-signature:536871559 0 0 0 415 0;}  /* Style Definitions */  p.MsoNormal, li.MsoNormal, div.MsoNormal 	{mso-style-parent:""; 	margin:0in; 	margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:12.0pt; 	font-family:"Times New Roman"; 	mso-fareast-font-family:"Times New Roman";} @page Section1 	{size:8.5in 11.0in; 	margin:1.0in 1.25in 1.0in 1.25in; 	mso-header-margin:.5in; 	mso-footer-margin:.5in; 	mso-paper-source:0;} div.Section1 	{page:Section1;} --&gt; &lt;/style&gt;&lt;!--[if gte mso 10]&gt; &lt;style&gt;  /* Style Definitions */  table.MsoNormalTable 	{mso-style-name:"Table Normal"; 	mso-tstyle-rowband-size:0; 	mso-tstyle-colband-size:0; 	mso-style-noshow:yes; 	mso-style-parent:""; 	mso-padding-alt:0in 5.4pt 0in 5.4pt; 	mso-para-margin:0in; 	mso-para-margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:10.0pt; 	font-family:"Times New Roman"; 	mso-ansi-language:#0400; 	mso-fareast-language:#0400; 	mso-bidi-language:#0400;} &lt;/style&gt; &lt;![endif]--&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;When you run your program the kernel first calls this function, WinMainCRTStartup. WinMainCRTStartup first initializes the CRT routines. Then it parses the command line and removes the filename portion and calls WinMain passing the parsed command line as lpszCommandLine. _tWinMain is a macro that equates to wWinMain / Winmain based on the UNOCDE preprocessor.&lt;u1:p&gt;&lt;/u1:p&gt;&lt;/span&gt;&lt;span style="font-family: Verdana;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; font-family: Verdana; color: blue;"&gt;&lt;u1:p&gt; &lt;/u1:p&gt;#ifdef  _UNICODE&lt;u1:p&gt;&lt;/u1:p&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; font-family: Verdana; color: blue;"&gt;#define _tWinMain   wWinMain&lt;u1:p&gt;&lt;/u1:p&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; font-family: Verdana; color: blue;"&gt;#else   /* ndef _UNICODE */&lt;u1:p&gt;&lt;/u1:p&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; font-family: Verdana; color: blue;"&gt;#define _tWinMain   WinMain&lt;u1:p&gt;&lt;/u1:p&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; font-family: Verdana; color: blue;"&gt;#endif  /* _UNICODE */&lt;u1:p&gt;&lt;/u1:p&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;&lt;u1:p&gt;The WinMain will call AfxWinMain defined in winmain.cpp.&lt;u1:p&gt;&lt;/u1:p&gt;&lt;/u1:p&gt;&lt;/span&gt;&lt;span style="font-family: Verdana;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 8pt; font-family: Verdana; color: rgb(0, 153, 0);"&gt;&lt;u1:p&gt;extern "C" int WINAPI&lt;br /&gt;_tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,&lt;br /&gt;   LPTSTR lpCmdLine, int nCmdShow)&lt;br /&gt;{&lt;br /&gt;    // call shared/exported WinMain&lt;br /&gt;&lt;br /&gt;    return AfxWinMain(hInstance, hPrevInstance, lpCmdLine, nCmdShow);&lt;br /&gt;}&lt;u1:p&gt;&lt;/u1:p&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/u1:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 8pt; font-family: Verdana; color: rgb(0, 153, 0);"&gt;&lt;u1:p&gt; &lt;/u1:p&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 8pt; font-family: Verdana; color: rgb(0, 153, 0);"&gt;int AFXAPI AfxWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,&lt;br /&gt;   LPTSTR lpCmdLine, int nCmdShow)&lt;br /&gt;{&lt;br /&gt;    ASSERT(hPrevInstance == NULL);&lt;br /&gt;&lt;br /&gt;    int nReturnCode = -1;&lt;br /&gt;    CWinThread* pThread = AfxGetThread();&lt;br /&gt;    CWinApp* pApp = AfxGetApp();&lt;br /&gt;&lt;br /&gt;    // AFX internal initialization&lt;br /&gt;&lt;br /&gt;    if (!AfxWinInit(hInstance, hPrevInstance, lpCmdLine, nCmdShow))&lt;br /&gt;        goto InitFailure;&lt;br /&gt;&lt;br /&gt;    // App global initializations (rare)&lt;br /&gt;&lt;br /&gt;    if (pApp != NULL &amp;amp;&amp;amp; !pApp-&gt;InitApplication())&lt;br /&gt;        goto InitFailure;&lt;br /&gt;&lt;br /&gt;    // Perform specific initializations&lt;br /&gt;&lt;br /&gt;    if (!pThread-&gt;InitInstance())&lt;br /&gt;    {&lt;br /&gt;        if (pThread-&gt;m_pMainWnd != NULL)&lt;br /&gt;        {&lt;br /&gt;            TRACE0("Warning: Destroying non-NULL m_pMainWnd\n");&lt;br /&gt;            pThread-&gt;m_pMainWnd-&gt;DestroyWindow();&lt;br /&gt;        }&lt;br /&gt;        nReturnCode = pThread-&gt;ExitInstance();&lt;br /&gt;        goto InitFailure;&lt;br /&gt;    }&lt;br /&gt;    nReturnCode = pThread-&gt;Run();&lt;br /&gt;&lt;br /&gt;InitFailure:&lt;br /&gt;#ifdef _DEBUG&lt;br /&gt;    // Check for missing AfxLockTempMap calls&lt;br /&gt;&lt;br /&gt;    if (AfxGetModuleThreadState()-&gt;m_nTempMapLock != 0)&lt;br /&gt;    {&lt;br /&gt;        TRACE1("Warning: Temp map lock count non-zero (%ld).\n",&lt;br /&gt;            AfxGetModuleThreadState()-&gt;m_nTempMapLock);&lt;br /&gt;    }&lt;br /&gt;    AfxLockTempMaps();&lt;br /&gt;    AfxUnlockTempMaps(-1);&lt;br /&gt;#endif&lt;br /&gt;&lt;br /&gt;    AfxWinTerm();&lt;br /&gt;    return nReturnCode;&lt;br /&gt;}&lt;u1:p&gt;&lt;/u1:p&gt;&lt;/span&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;&lt;u1:p&gt; &lt;/u1:p&gt;The functions AfxGetThread and AfxGetApp are used to get pointers to the CWinApp and CWinThread. AfxGetThread and AfxGetApp got their information from the CWinApp constructor in appcore.cpp&lt;u1:p&gt;&lt;/u1:p&gt;&lt;/span&gt;&lt;span style="font-family: Verdana;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 8pt; font-family: Verdana; color: rgb(0, 153, 0);"&gt;&lt;u1:p&gt;pThreadState-&gt;m_pCurrentWinThread = this;&lt;u1:p&gt;&lt;/u1:p&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/u1:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 8pt; font-family: Verdana; color: rgb(0, 153, 0);"&gt;pModuleState-&gt;m_pCurrentWinApp = this;&lt;br /&gt;pThreadState is a AFX_MODULE_THREAD_STATE* and pModuleState is a AFX_MODULE_STATE*.&lt;u1:p&gt;&lt;/u1:p&gt;&lt;/span&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;&lt;u1:p&gt;All MFC applications have at least two objects: an application object derived from CWinApp, and some sort of main window object, derived  from CFrameWnd / CMDIFramend /  CDialog, all of which are derived from CWnd. &lt;span style="color: red;"&gt;C++ programs will first create all global and static objects before execution begins.&lt;/span&gt; It will happen much before AfxWinMain gets called. There is only statement in the entire program that has global scope is the statement that instantiates the application object. &lt;u1:p&gt;&lt;/u1:p&gt;&lt;/u1:p&gt;&lt;/span&gt;&lt;span style="font-family: Verdana;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;&lt;u1:p&gt;CWinApp derived class constructor gets called and the AFX_MODULE_STATE structure is setup properly. Now AfxWinInit is called and this function initializes the MFC framework. Here it calls the InitInstance of the CWinApp derived object. &lt;o:p&gt;&lt;/o:p&gt;&lt;/u1:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;u1:p&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Then CWinApp::Run is called. Within the Run function is implemented default message loop. The Run() acquires and dispatches Windows messages until the application receives a &lt;span style=""&gt;WM_QUIT&lt;/span&gt; message. After &lt;span style=""&gt;WM_QUIT&lt;/span&gt; message, Run returns and control returns to AfxWinMain which performs clean-up and lastly calls AfxWinTerm which deletes all the global application structures that were created.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/u1:p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=";font-family:Verdana;font-size:10;"  &gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=";font-family:Verdana;font-size:10;"  &gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/571418932549516258-7451905527440667089?l=chhotisibaath.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chhotisibaath.blogspot.com/feeds/7451905527440667089/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://chhotisibaath.blogspot.com/2009/12/mfc-running-procedure.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/571418932549516258/posts/default/7451905527440667089'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/571418932549516258/posts/default/7451905527440667089'/><link rel='alternate' type='text/html' href='http://chhotisibaath.blogspot.com/2009/12/mfc-running-procedure.html' title='MFC running procedure'/><author><name>FEBIL CHACKO</name><uri>http://www.blogger.com/profile/08163864794794790326</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_FOFi1VkIX8w/Sr8FggpqIDI/AAAAAAAABMc/rRpEVpTsdgE/S220/IMG_2305.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-571418932549516258.post-8577204134554751741</id><published>2009-12-19T02:06:00.000-08:00</published><updated>2009-12-21T07:42:23.972-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='CObject'/><category scheme='http://www.blogger.com/atom/ns#' term='MFC'/><category scheme='http://www.blogger.com/atom/ns#' term='VC++'/><title type='text'>The CObject class</title><content type='html'>CObject is the base class for MFC classes. The CObject class contains 3 main useful features&lt;br /&gt;1. Serialization Support&lt;br /&gt;2. Run Time class information support&lt;br /&gt;3. Diagnostic and debugging support&lt;br /&gt;The derived classes from cobject, can exploit these features&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/571418932549516258-8577204134554751741?l=chhotisibaath.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chhotisibaath.blogspot.com/feeds/8577204134554751741/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://chhotisibaath.blogspot.com/2009/12/cobject-class.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/571418932549516258/posts/default/8577204134554751741'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/571418932549516258/posts/default/8577204134554751741'/><link rel='alternate' type='text/html' href='http://chhotisibaath.blogspot.com/2009/12/cobject-class.html' title='The CObject class'/><author><name>FEBIL CHACKO</name><uri>http://www.blogger.com/profile/08163864794794790326</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_FOFi1VkIX8w/Sr8FggpqIDI/AAAAAAAABMc/rRpEVpTsdgE/S220/IMG_2305.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-571418932549516258.post-4419380103043974805</id><published>2009-09-27T09:19:00.000-07:00</published><updated>2009-12-21T07:43:19.929-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='c++'/><category scheme='http://www.blogger.com/atom/ns#' term='Thread'/><category scheme='http://www.blogger.com/atom/ns#' term='::Sleep(0)'/><title type='text'>Usage of ::Sleep(0)</title><content type='html'>The Sleep() function is normally used to put a thread to sleep for a particular time period. The time period is passed as the parameter to the Sleep() function. The statement Sleep(0) has even a hand on thread scheduler in case of multithreaded application. It can be explained with a small example that you have an application which fills 5 different colored balls uniformly in a bucket with 5 threads running at a time. Each thread is assigned with a color. If you just allow each thread to run in a loop, all the threads will try to grab the maximum CPU time it can get without bothering about the other threads running in parallel. This doesn't give a color uniformity for the filling process. you can maintain this uniformity by putting a Sleep(0)  statement in each thread at the place where you have finished putting a single ball. This will relinquish the CPU for the next thread allowing it to put a ball into bucket.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/571418932549516258-4419380103043974805?l=chhotisibaath.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chhotisibaath.blogspot.com/feeds/4419380103043974805/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://chhotisibaath.blogspot.com/2009/09/usage-of-sleep0.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/571418932549516258/posts/default/4419380103043974805'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/571418932549516258/posts/default/4419380103043974805'/><link rel='alternate' type='text/html' href='http://chhotisibaath.blogspot.com/2009/09/usage-of-sleep0.html' title='Usage of ::Sleep(0)'/><author><name>FEBIL CHACKO</name><uri>http://www.blogger.com/profile/08163864794794790326</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_FOFi1VkIX8w/Sr8FggpqIDI/AAAAAAAABMc/rRpEVpTsdgE/S220/IMG_2305.jpg'/></author><thr:total>0</thr:total></entry></feed>
