#include "test.h" template&lt;typename T&gt; test&lt;T&gt;::test(const T &amp;elem):data(elem) { }  template&lt;typename T&gt; test&lt;T&gt;::~test() {     delete data; } template&lt;typename T&gt; class test { private:     T data; public:     test(const T &amp;elem);     ~test(); }; #include"test.h" int main() {     test&lt;int&gt; a(2); }   Classes and implementations and main functions are written in different files by me, when i try to compile it ,The compiler will report an error,but i can't find what's wrong.
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.)
What are Java command line options to set to allow JVM to be remotely debugged? I know there's some JAVA_OPTS to set to remotely debug a Java program.  What are they and what do they mean ? How do I increase the size of swapfile without removing it in the terminal? Is there a way to increase my existing "swapfile" without having to destroy and re-create it? I would like to up my swap space from 1GB to 2GB.  Currently it is set up as such:  $ sudo swapon -s Filename                Type        Size    Used    Priority /swapfile               file        1048572 736640  -1 $ ls -lh /swapfile -rw------- 1 root root 1.0G Nov  9  2016 /swapfile   I'm using Ubuntu 14.04. How to disable Spotify indicator in the top panel? The Spotify indicator icon clashes with the native Unity theme, and is redundant, since it is already listed in the Sound indicator menu. Is there a way to remove or disable the Spotify indicator? Or at least to change the icon (couldn't grep it on my filesystem). I am using the Spotify "preview" with 12.04. Thanks! I am reading Boyd &amp; Vandenberghe's Convex Optimization. The authors use curved greater than or equal to (\succcurlyeq)  $$f(x^*) \succcurlyeq \alpha$$  and curved less than or equal to (\preccurlyeq)  $$f(x^*) \preccurlyeq \alpha$$  Can someone explain what they mean? Why we use $L_2$ Space In QM? I asked this question for many people/professors without getting a sufficient answer, why in QM Lebesgue spaces of second degree are assumed to be the one that corresponds to the Hilbert vector space of state functions, from where this arises? and why 2-order space that assumes the following inner product:  $\langle\phi|\psi\rangle =\int\phi^{*}\psi\,dx$  While there is many ways to define the inner product.  In Physics books, this always assumed as given, never explains it, also I tried to read some abstract math books on this things, and found some concepts like "Metric weight" that will be minimized in such spaces, even so I don't really understand what is behind that, so why $L_2$? what special about them? Who and how physicists understood that those are the one we need to use? Bottom of tool shelf grayed out How does new shield system work? After the upgrade I can't figure out how the new shield system works. I have the option to discard the shield, and I notice I have a new potion in the inventory.  More importantly, I got attacked (and lost) twice in a short amount of time and don't have a shield. When do you now get shield? Using Newton's method calculate $ \frac{1}{\sqrt{a}} $ without division Suggest algorithm for the numerical calculation $ \frac{1}{\sqrt{a}} \ a &gt; 0 $ without division, use Newton's method.  My idea is:  $$ \frac{1}{\sqrt{a}} = (\sqrt{a})^{-1} = a^{-\frac{1}{2}}$$ $$ x = a^{-\frac{1}{2}} \Rightarrow f(x)=x^2 - a^{-1}$$ And next step is calulate $ f'(x)=2x $, but after substitution I got: $$ x_{n+1} = \frac{x_n^2+a^{-1}}{2x_n}$$ And know I still have divion, I guess. Maybe you've better idea on this task? An inequality from Littlewood's Miscellany How to kill The Twins In Terraria In Terraria I often try to defeat spazmatism first, but when he transformed, his flamethrower killed me. What is easiest way to kill The Twins? Number of edges of any spanning tree of a graph $G$ coming from a subgraph of $G$ Consider a simple undirected, unweigthed graph $G=(V,E)$ and its edge-induced subgraph $G^{*}=(V^{*},E^{*})$. Suppose that $G$ and $G^{*}$ have $c$ and $c^{*}$ connected components, respectively. Is it true that any spanning tree of $G$ has exactly  $$|V^{*}|-\min\{c^{*},c\}$$  edges from $E^{*}$? Could somebody give a proof/counterexample? Thank you for the help! Two very closely related questions:  If a card has two different "Sacrifice this creature for X" abilities on it, does sacrificing it give both benefits?  Likewise, if a card requires a creature to be sacrificed, but that creature has a "Sacrifice this creature for X" ability, do you get the sacrifice benefit when you sacrifice it for the other requirement? One of my laptop's keys has fallen off. Is there any way I can remap another key to serve as that key?  I'll 'sacrifice' the other key because I never use it. $\lim_{x\to 0} \frac{\sin x - x}{x^2}$ without L'Hospital or Taylor How to overwrite an excel application without prompting the users I know Blender is free software and bugs happen. But my question is, is it good practice to update Blender every time there is an update? Even if a minor one? (i.e I'd consider 2.56 to 2.56b minor or even 2.63, no?)  I haven't been updating very often for fear that updating frequently causes issues like broken settings, non-compatibility or lost user configs?  Or is updating often recommended to keep up to date and adapted to the new changes, i.e like upgrades in the GUI and functionality? I have installed Ubuntu alongside Windows 8.1. But the wifi is not working in Ubuntu (perhaps the drivers are not present), which worked fine in windows. Also I cant connect with Ethernet since my laptop does not have an Ethernet port. So is there any way for me to connect to the internet in ubuntu? Edit: Output of the terminal command  lspci -knn | grep Net -A2:  vikram@vikram-Inspiron-11-3148:~$ lspci -knn | grep Net -A2 01:00.0 Network controller [0280]: Broadcom Corporation BCM43142 802.11b/g/n [14e4:4365] (rev 01)     Subsystem: Dell Device [1028:0018]     Kernel driver in use: bcma-pci-bridge vikram@vikram-Inspiron-11-3148:~$    I did what Pilot6 suggested. Here is the output:    vikram@vikram-Inspiron-11-3148:~$ sudo dpkg -i *.deb [sudo] password for vikram:  Selecting previously unselected package bcmwl-kernel-source. (Reading database ... 163804 files and directories currently installed.) Preparing to unpack bcmwl-kernel-source_6.30.223.141+bdcom-0ubuntu2_amd64.deb ... Unpacking bcmwl-kernel-source (6.30.223.141+bdcom-0ubuntu2) ... Selecting previously unselected package dkms. Preparing to unpack dkms_2.2.0.3-1.1ubuntu5.14.04_all.deb ... Unpacking dkms (2.2.0.3-1.1ubuntu5.14.04) ... Setting up dkms (2.2.0.3-1.1ubuntu5.14.04) ... Setting up bcmwl-kernel-source (6.30.223.141+bdcom-0ubuntu2) ... Loading new bcmwl-6.30.223.141+bdcom DKMS files... First Installation: checking all kernels... Building only for 3.16.0-30-generic Building for architecture x86_64 Building initial module for 3.16.0-30-generic ERROR (dkms apport): kernel package linux-headers-3.16.0-30-generic is not supported Error! Bad return status for module build on kernel: 3.16.0-30-generic (x86_64) Consult /var/lib/dkms/bcmwl/6.30.223.141+bdcom/build/make.log for more information. modprobe: FATAL: Module wl not found. update-initramfs: deferring update (trigger activated) Processing triggers for man-db (2.6.7.1-1ubuntu1) ... Processing triggers for initramfs-tools (0.103ubuntu4.2) ... update-initramfs: Generating /boot/initrd.img-3.16.0-30-generic vikram@vikram-Inspiron-11-3148:~$ Is a black hole singularity a single point? General relativity is expressed in terms of differential geometry, which allows you to do interesting things with the coordinates: multiple coordinates may refer to a single point, eg. the  has whole lines at the top and the bottom that correspond to the North and South poles, respectively; or a single coordinate may refer to multiple points, for example by using inverse geometry the origin refers to all the points infinitely far away.  So, is the singularity just a single point in the curved spacetime, or can it be a more extended object, described by a single coordinate? Delete all but top n from database table in SQL What's the best way to delete all rows from a table in sql but to keep n number of rows on the top? Exponent and abelian groups