Will not create a class template for c++ I am trying to figure out how to use classes with class template and I get these errors:   Error   1   error LNK2019: unresolved external symbol "public: __thiscall AdtBag::AdtBag(void)" (??0?$AdtBag@H@@QAE@XZ) referenced in function _main  C:\Users\User\Documents\Visual Studio 2013\Projects\ADTBagAddition\ADTBagAddition\Source.obj    ADTBagAddition  Error   2   error LNK2019: unresolved external symbol "public: __thiscall AdtBag::~AdtBag(void)" (??1?$AdtBag@H@@QAE@XZ) referenced in function _main C:\Users\User\Documents\Visual Studio 2013\Projects\ADTBagAddition\ADTBagAddition\Source.obj    ADTBagAddition  Error   3   error LNK2019: unresolved external symbol "public: void __thiscall AdtBag::store_in_bag(int)" (?store_in_bag@?$AdtBag@H@@QAEXH@Z) referenced in function _main C:\Users\User\Documents\Visual Studio 2013\Projects\ADTBagAddition\ADTBagAddition\Source.obj    ADTBagAddition  Error   4   error LNK2019: unresolved external symbol "public: int __thiscall AdtBag::whats_in_bag(void)" (?whats_in_bag@?$AdtBag@H@@QAEHXZ) referenced in function _main  C:\Users\User\Documents\Visual Studio 2013\Projects\ADTBagAddition\ADTBagAddition\Source.obj    ADTBagAddition  Error   5   error LNK1120: 4 unresolved externals   C:\Users\User\Documents\Visual Studio 2013\Projects\ADTBagAddition\Debug\ADTBagAddition.exe ADTBagAddition  Here is my code:   source.cpp  #include &lt;iostream&gt; #include "AdtBag.h"  using namespace std;  int main () {     AdtBag&lt;int&gt; BagInt;     int a = 78;     cout &lt;&lt; "Int Bag Contains: " &lt;&lt; endl;     BagInt.store_in_bag ( a );     cout &lt;&lt; BagInt.whats_in_bag () &lt;&lt; endl;      return 0; }   AdtBag.h  #ifndef __ADTBAG__ #define __ADTBAG__  template&lt;class ItemType&gt; class AdtBag { private:     ItemType in_bag; public:     AdtBag&lt;ItemType&gt; ();     ~AdtBag&lt;ItemType&gt; ();      void store_in_bag ( ItemType into_bag );     ItemType whats_in_bag (); };  #endif   AdtBag.cpp  #include "AdtBag.h"  template &lt;class ItemType&gt; AdtBag&lt;ItemType&gt;::AdtBag () { }  template &lt;class ItemType&gt; AdtBag&lt;ItemType&gt;::~AdtBag () { }  template&lt;class ItemType&gt; void AdtBag&lt;ItemType&gt;::store_in_bag ( ItemType into_bag ) {     in_bag = into_bag; }  template&lt;class ItemType&gt; ItemType AdtBag&lt;ItemType&gt;::whats_in_bag () {     return in_bag; }   Why is this producing the error messages? I'm using Visual Studio 2013 if that matters. I thought I did everything correctly, but I guess not. Any suggestions?
Why can templates only be implemented in the header file? Quote from :     The only portable way of using templates at the moment is to implement them in header files by using inline functions.   Why is this?  (Clarification: header files are not the only portable solution. But they are the most convenient portable solution.)
I am new to Linux and Ubuntu. When I don't know how to do something with this OS I search on the web and Ask Ubuntu and always find the answer.  But sometimes it's not a great answer nor complete tutorial. I follow the instructions anyway, but I don't know what all the commands mean.  So my question is:   When I follow a tutorial, am I 100% safe? If not, then how can I tell I am in danger? error: no such partition. Grub rescue Going to Pakistan in 3 weeks time but my NICOP is expired and my son's hasn't arrived yet My NICOP is expired and I have already booked a flight to Pakistan via Qatar Airways. My wife has a valid NICOP card but my 5 years old child  has never had a NICOP or any other Pakistani ID card other than the British passport. I have made an appointment for next Monday to renew my NICOP and apply for my child's new NICOP card. My question is, what if the cards of my child and mine don't arrive in time, can we still travel to Pakistan, given that we have the receipts as a proof of application? Is there a vendor for animal parts? I'm looking to upgrade all my pouches, but some animals are hard to find, or the part needed drops rarely.  Is there a merchant somewhere that sells them outright? I have shards to spare. Supremum of a product measurable function... Transitive subgroup of symmetric group $S_n$ containing an $(n-1)$-cycle and a transposition $N(ab) \geq N(a)$ is not necessary for the ring to be euclidean The definition of euclidean ring in my textbook is 1) $N(ab) \geq N(a)$ 2) Euclidean algorithm works. However there is a note that the first condition is not necessary. There is a hint that we can choose a following norm: $N'(a) = \min_{b\sim a} N(b)$. I do not understand why it works. We need to check that euclidean algorithm still works with this norm.   I tried to do the following. If $a \sim b$, then $a = bx, x \in K^*$. Let $N'(a)$ be $N(ax)$. Let us divide $ax$ by $bx$ instead of $b$. We get $ax = bxq + rx$, $N(rx) \leq N(bx)$. Here I am stuck and have no idea how to continue. Python - email header decoding UTF-8 Misplaced/Overlapping Navigation Item Text on iOS 10 The bug displayed in the attached screenshot occurs consistently for me while running the developer beta of iOS 10 using v1.5.2 of the Stack Exchange app on an iPhone 6.  I was able to recreate this by simply tapping on any question or answer in my feed with a long title. This doesn't appear to be a bug with iOS 10 itself since I haven't seen it in other apps, but I could be wrong. How to compute the topological space of fibered product of schemes? How does vendor restocking work in Fallout 4? From Rudin's Principles of Mathematical Analysis (Chapter 2, Exercise 6)  Let $E'$ be the set of all limit points of a set $E$. Prove that $E'$ is closed.  I think I got it but my argument is a bit hand wavy:  If $x$ is a limit point of $E'$, then every neighborhood of $x$ contains some $y\in E'$, and every neighborhood of $y$ contains some $z\in E$. Therefore every neighborhood of $x$ contains some $z\in E$, and so $x$ is a limit point of $E$. Then $x\in E'$, so $E'$ is closed.  The thing that's bugging me is the leap from one neighborhood to another. Is this formally correct? Ask question post button remains disabled I've noticed this twice in the last ~2 weeks or so. The &quot;post your question&quot; button can remain disabled for some reason even when your question is shown as &quot;ready to publish&quot;. I.e., you've gotten to the &quot;review&quot; page after the initial edit. If I remember correctly, one case was on Stack Overflow, and the other was on . I'm not sure what exact scenario leads up to this. I haven't paid attention to the button until the last step when I'm ready to click it. The workaround has been to reload the page. (I copied my content for safe-keeping first.) This works, and the button then shows up as active. Afterwards, however, on both occasions, it forced me through the &quot;are you a human&quot; verification.  Update - this question itself did not exhibit this, nor did it do the .  Update - I'm using Chrome on Windows and am not sure what version it was when this happened.  It has  installed, but there aren't any scripts for any Stack Exchange sites.  It has  installed.  The virus scanner on the PC I probably was using was What does goodness of fit mean in context of linear regression I am having trouble understanding the concept of 'goodness of fit' w.r.t linear regression. The name suggests that the goodness of fit test is used to determine how well a model fits the data.  But the linear model is already the 'best' fit since we have minimized the sum of the squared error terms. Why do we need to test 'goodness of fit' again? We know it is a good fit because we minimized the sum of the squared errors. Is it possible to understand the One Piece storyline by watching the movies only? To be short, I want to copy a folder to a location /usr/share/screenlets/.... in Ubuntu 10.04 system. I tried by logging in as root from terminal giving su.   I even changed my user account type to ADMINISTRATOR; Yet, no use. PASTE option in the context menu's list in the folder /usr/share/... is INACTIVE.  How can I copy those files? How to install GUI desktop on a server? After installing Ubuntu server how do I install the desktop environment? Does $a\mid bc$ imply $a\mid b$ or $a\mid c$? I am not sure I understand this I just to an explanation to this question:  If $a, b, c \in \Bbb{Z}^+$ and $a\mid bc$, does it follow that $a\mid b$ or $a\mid c$? How to read negative radians in the interval? Say a function's domain is $\{-\pi/2, \pi/2\}$. How should I interpret this interval?  It starts from where? To where? In what direction?  And if it starts from $3\pi/2$, would the next one be $-5\pi/3$.(because it starts from negative, $-\pi/2$). PHP in_array() / array_search() odd behaviour