<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel>
    <title>'LNK 2019 and LNK 1120' Thread RSS Feed</title>
    <link>http://www.programmersheaven.com/</link>
    <description>Contains the latest posts from the thread 'LNK 2019 and LNK 1120' posted on the 'Visual C++' forum at Programmer's Heaven.</description>
    <language>en</language>
    <copyright>Copyright 2013 Programmers Heaven</copyright>
    <pubDate>Sat, 25 May 2013 03:04:09 -0700</pubDate>
    <lastBuildDate>Sat, 25 May 2013 03:04:09 -0700</lastBuildDate>
    <generator>Argotic Syndication Framework 2007.3.0.1, http://www.codeplex.com/Argotic</generator>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <ttl>360</ttl>
    <image>
      <url>http://www.programmersheaven.com/images/ph.gif</url>
      <title>Programmers Heaven</title>
      <link>http://www.programmersheaven.com/</link>
      <width>88</width>
      <height>31</height>
    </image>
    <item>
      <title>LNK 2019 and LNK 1120</title>
      <link>http://www.programmersheaven.com/mb/vcpage/427497/427497/lnk-2019-and-lnk-1120/</link>
      <description>I am new to c++ and am using visual 2010. I'm trying to get to grips with templates and have compiled the following code&lt;br /&gt;
&lt;br /&gt;
1 #include "stdafx.h"&lt;br /&gt;
2&lt;br /&gt;
3 template&amp;lt;class T&amp;gt; &lt;br /&gt;
4 class Vcr {&lt;br /&gt;
5	int length;				// number of entries&lt;br /&gt;
6	T* vr;					// entries of vector&lt;br /&gt;
7 public:&lt;br /&gt;
8	template &amp;lt;class U&amp;gt; friend class Vcr;&lt;br /&gt;
9	Vcr(int, const T* const);		// constructor&lt;br /&gt;
10	Vcr(int = 0, T = 0);			// constructor&lt;br /&gt;
11	Vcr(const Vcr&amp;amp;);			// copy of constructor&lt;br /&gt;
12	~Vcr(){ delete[] vr;}			// destructor&lt;br /&gt;
13&lt;br /&gt;
14	int size() const { return length; }	// number of entries&lt;br /&gt;
15	Vcr&amp;amp; operator=(const Vcr&amp;amp;);		// assignment&lt;br /&gt;
16	T&amp;amp; operator[](int i) { return vr[i]; }	// subscripting&lt;br /&gt;
17	Vcr&amp;amp; operator+=(const Vcr&amp;amp;);		// v += v2&lt;br /&gt;
18	T maxnorm() const;	// maximum norm&lt;br /&gt;
19&lt;br /&gt;
20	template&amp;lt;class S&amp;gt;	// dot product&lt;br /&gt;
21	friend S dot(const Vcr&amp;lt;S&amp;gt;&amp;amp;, const Vcr&amp;lt;S&amp;gt;&amp;amp;);&lt;br /&gt;
22&lt;br /&gt;
23 }; &lt;br /&gt;
24&lt;br /&gt;
25 int _tmain(int argc, _TCHAR* argv[]) {&lt;br /&gt;
26&lt;br /&gt;
27	Vcr&amp;lt;double&amp;gt; (20);&lt;br /&gt;
28	return 0;&lt;br /&gt;
29 }&lt;br /&gt;
&lt;br /&gt;
When I build the code I get the following error messages&lt;br /&gt;
&lt;br /&gt;
: error LNK2019: unresolved external symbol "public: __thiscall Vcr&amp;lt;double&amp;gt;::Vcr&amp;lt;double&amp;gt;(int,double)" (??0?$Vcr@N@@QAE@HN@Z) referenced in function _wmain&lt;br /&gt;
&lt;br /&gt;
: fatal error LNK1120: 1 unresolved externals&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Any help would be appreciated.&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/vcpage/427497/427497/lnk-2019-and-lnk-1120/</guid>
      <pubDate>Sun, 19 Feb 2012 08:39:30 -0700</pubDate>
      <category>Visual C++</category>
    </item>
  </channel>
</rss>