I have the following code and I am getting these errors:  "/tmp/ccymmVdG.o: In function `main': 1main.cpp:(.text+0x30): undefined reference to `unique_int_ptr::unique_int_ptr(int*)"   unique_int.hpp  #ifndef UNIQUE_PTR_HPP_INCLUDED #define UNIQUE_PTR_HPP_INCLUDED #include &lt;typeinfo&gt;  template&lt;class Template&gt; class unique_ptr {      public:            unique_ptr(Template* ptr);           ~ unique_ptr();           Template* get();           Template* operator-&gt;();           Template&amp; operator*();      private:           Template* m_ptr;          /* unique_ptr(unique_ptr&lt;Template&gt; const&amp;);           unique_ptr&amp; operator=(const unique_ptr&amp;);*/ };  #endif /* UNIQUE_PTR_HPP_INCLUDED */   unique_int_ptr.hpp  #ifndef UNIQUE_PTR_INT_HPP_INCLUDED #define UNIQUE_PTR_INT_HPP_INCLUDED   class unique_int_ptr {     public:         int* get();         unique_int_ptr (int* data);         ~unique_int_ptr ();     private:         int* m_ptr; }; #endif //UNIQUE_PTR_INT_HPP_INCLUDED   unique_ptr.cpp  #include &lt;stdio.h&gt; #include "unique_ptr.hpp"  template&lt;typename Template&gt;  unique_ptr&lt;Template&gt;::unique_ptr(Template* ptr) {     m_ptr = ptr; }  template&lt;typename Template&gt;  unique_ptr&lt;Template&gt;::~unique_ptr() {     delete m_ptr; }  template&lt;typename Template&gt;  Template* unique_ptr&lt;Template&gt;::get() {     return m_ptr; }  template&lt;typename Template&gt; Template* unique_ptr&lt;Template&gt;:: operator -&gt;() {     return m_ptr; }  template&lt;typename Template&gt; Template&amp; unique_ptr&lt;Template&gt;::operator *() {     return *m_ptr; }   unique_int_ptr.cpp      #include "unique_int_ptr.hpp" #include &lt;stdio.h&gt;  unique_int_ptr::unique_int_ptr (int* data) {     m_ptr = new int;     m_ptr = data; }  unique_int_ptr::~unique_int_ptr() {     delete m_ptr; }  int* unique_int_ptr::get () {      return m_ptr; }   1main.cpp  #include "unique_ptr.hpp" #include "unique_int_ptr.hpp" #include &lt;stdio.h&gt; #include &lt;iostream&gt;  #define TEST_TRUE(x)  printf("Test '%s' %s\n", #x, (x) ? "passed" : "failed!") struct SimpleData {     int first;     char second; }; this is my main function  int main() {     {         int* data = new int(55);    // allocate raw pointer          // create a managed pointer and let it manage data         unique_int_ptr data_ptr(data);          // Make sure that both pointers show the same value         TEST_TRUE(*data == *data_ptr.get());          // Both ways         *(data_ptr.get()) = 99;        TEST_TRUE(*data == *data_ptr.get());     };     {         int* data = new int(55);    // allocate raw pointer          // create a managed pointer and let it manage data         unique_ptr&lt;int&gt; data_ptr(data);          // Make sure that both pointers show the same value         TEST_TRUE(*data == *data_ptr.get());          // Both ways         *(data_ptr.get()) = 99;         TEST_TRUE(*data == *data_ptr.get());     };     {         SimpleData* data = new SimpleData;    // allocate raw pointer         data-&gt;first = 55;         data-&gt;second = 'C';          // create a managed pointer and let it manage data         unique_ptr&lt;SimpleData&gt; data_ptr(data);          // Make sure that both pointers show the same value         TEST_TRUE(data-&gt;first == data_ptr-&gt;first);         TEST_TRUE(data-&gt;second == data_ptr-&gt;second);          // Both ways         data_ptr-&gt;first = 99;         data_ptr-&gt;second = 'D';         TEST_TRUE(data-&gt;first == data_ptr-&gt;first);         TEST_TRUE(data-&gt;second == data_ptr-&gt;second);          unique_ptr&lt;int&gt; int_ptr(new int);         *int_ptr = 199;       // both allocations are released here     }     return 0; }   Do you have any idea why I am getting that error? This error appears several times. I looked at other examples about templates but it does not work.
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.)
How to debug "Cross-thread operation not valid" error in C#? Sometimes I'm looking for date-sensitive information and don't want to see results more than a certain age.  Is there a way to specify this in a Google search? Is Dragonstone unoccupied after Stannis Baratheon's defeat? Is anything known about Dragonstone after:      Stannis Baratheon is killed in his bid for the Iron Throne?   As the seat of the naval defense of King's Landing and the birthplace of Daenerys Targaryen, she has a vested interest in taking it.   At the conclusion of Season 6 Episode 10, is Dragonstone unoccupied? Are we discouraged from fixing typos and misspellings on Stack Exchange sites? I just attempted to fix a typo on a question on cooking.stackexchange.com and saw this     Oops! Your edit couldn't be submitted because:         Your edit summary must be at least 10 characters   This edit is less than 6 characters; surely more can be improved with your edit?      So, misspelled words have to just be left misspelled?  That could prevent the post from being found in a search. Brackets in if condition: why am I getting syntax errors without whitespace? I am using the below script to move two days back when script runs at starting two days of the year and also check first and second days of every month and move two days back. if [$month=&quot;01&quot;] &amp;&amp; [$day=&quot;01&quot;]; then         date=&quot;$last_month/$yes_day/$last_year&quot;         fulldate=&quot;$last_month/$yes_day/$last_year&quot; else         if [$month=&quot;01&quot;] &amp;&amp; [$day=&quot;02&quot;]; then                 date=&quot;$last_month/$yes_day/$last_year&quot;                 fulldate=&quot;$last_month/$yes_day/$last_year&quot;         else                 if [ $day = &quot;01&quot; ]; then                         date=&quot;$last_month/$yes_day/$year&quot;                         fulldate=&quot;$year$last_month$yes_day&quot;                 else                         if [ $day = &quot;02&quot; ]; then                                 date=&quot;$last_month/$yes_day/$year&quot;                                 fulldate=&quot;$year$last_month$yes_day&quot;                         else                                 date=&quot;$month/$yes_day/$year&quot;                                 fulldate=&quot;$year$month$yes_day&quot;                         fi                 fi         fi fi  But my bad am getting the below error message Etime_script.sh: line 19: [06=01]: command not found Etime_script.sh: line 24: [06=01]: command not found Foolproof way to ensure Google news pulls the correct image for its thumbnails? Google news results have an acompanying thumbnail next to articles that show up in the results.    If Google's crawler can't find a thumbnail to pull from our site, it uses its next best guess from another site, therefore linking the image to another site but still uses our headline.  Example:  Headline from Reuters, Image from Livemint:   Our pages absolutely have images, they are not massive in file-size or dimensions, yet we are not having them pulled / crawled correctly.  We have read up on the suggestions from Google, and from others around the web and nothing is panning out.  Has anyone had any experience where they can ensure Google news will pull a thumbnail of our choosing? If development on the Stack Exchange iOS/Android apps has ceased indefinitely, what should we do to their bug reports and feature requests? It's been a while since the Stack&nbsp;Exchange team last had an iOS or Android developer, and the development job on the apps have not had any insights for years.  That, however, doesn't deny the fact that there are still many users to them. As a consequence, people are continuing to submit bug reports and sometimes feature requests about them.  If development on iOS/Android apps has ceased indefinitely, what should we do to their bug reports and feature requests?  Are we going to keep them with the hope that development on apps will resurrect one day, or just ignore them and telling users that development has frozen? How to rename file as below  AS1100801000002.RAW7AGS  AS1100801001008.RAW7AH4 AS1100801002001.RAW7AH9 AS1100801003002.RAW7AHE AS1100801004009.RAW7AHT AS1100801005002.RAW7AHY AS1100801010002.RAW7AJ3   to new name  AS1.txt AS2.txt AS3.txt AS4.txt AS5.txt AS6.txt AS7.txt A floor is paved with rectangular marble blocks,each of length $a$ and breadth $b$.A circular block of diameter $c(c&lt;a,b)$ is thrown on the floor at random.Show that the chance that it falls entirely on one rectangular block is $\frac{(a-c)(b-c)}{ab}$  I thought over this problem,i found total number of cases as area of rectangular marble block,but i cannot find the favorable number of cases.Favorable number of cases cannot be area of rectangular marble block$-$ area of circular block,as the answer suggests.What should be the correct logic,please help. How to prove the set $S$ is closed under the binary operation $a*b=a+b+kab$? Let $k$ be any nonzero real number and let $S$ be all real numbers except ${-1\over k}$. Let $a,b \in S$. Define * on S by $a*b=a+b+kab$. Prove that $S$ is closed under *.  All I can think to do is set $a*b$ equal to ${-1\over k}$, but I don't know where to go from there. Is that the extent of the proof? Divisibility by 7 rule, and Congruence Arithmetic Laws Possible Duplicate:          I've added myself back into the admin's group I think, by following   But I still can't do commands like:  sudo aptitude update   I get the message  oshirowanen is not in the sudoers file.  This incident will be reported.   How do I add myself into the sudoers group now that I am in the admin group? Does the series $\sum\limits_{n=1}^\infty \frac{1}{n\sqrt[n]{n}}$ converge? Does the following series converge? $$\sum_{n=1}^\infty \frac{1}{n\sqrt[n]{n}}$$   As $$\frac{1}{n\sqrt[n]{n}}=\frac{1}{n^{1+\frac{1}{n}}},$$ I was thinking that you may consider this as a p-series with $p&gt;1$. But I'm not sure if this is correct, as with p-series, p is a fixed number, right ? On the other hand, $1+\frac{1}{n}&gt;1$ for all $n$. Any hints ? I finally got dragonrend and defeated Alduin, but I'm still too weak for fighting ancient dragons. Any certain weapon for killing them.  (I've got lvl 20 one handed weapons and lvl 46 for archery, so the Dragonbane is out of the question) I would like to remove my Raspberry Pi from my iPhone 8 (running iOS 11.2.1) as a connected bluetooth device.  Normally, I would go into my Settings -> Bluetooth and select the Info button (a small blue circled "i") to show the "Disconnect" and "Forget Device" dialogs:    Unfortunately, iOS does not give me this option for my device. The bluetooth device list does not contain an "i" for the item, and there is seemingly no other way to disconnect.    How do I unpair this device if there is no button to trigger to the unpair prompt?  Due to work restrictions I cannot completely reset the device. Travel to Ireland (Dublin) with U.K. Visitor visa Putting char into a java string for each N characters I've got `PDOException: SQLSTATE[HY000] [2002] No such file or directory` when using drush I installed Drush for the first time (so it may be a configuration error) and I'm trying to update to the latest core version of Drupal.  Drush is giving me this error - I'm on an OSX box.  dev5:clientnamedirectory my.name$ drush pm-update projects drupal-7.25 &lt;h1&gt;Additional uncaught exception thrown while handling exception.&lt;/h1&gt;  &lt;h2&gt;Original&lt;/h2&gt;&lt;p&gt;PDOException: SQLSTATE[HY000] [2002] No such file or directory in drupal_get_installed_schema_version() (line 155 of /Users/my.name/Sites/proface/includes/install.inc).&lt;/p&gt;  &lt;h2&gt;Additional&lt;/h2&gt;  &lt;p&gt;PDOException: SQLSTATE[HY000] [2002] No such file or directory in system_list() (line 165 of /Users/my.name/Sites/clientnamedirectory/includes/module.inc).&lt;/p&gt;&lt;hr /&gt;  Drush command terminated abnormally due to an unrecoverable error. Travel alone on accompanied visa How do I reset proxy in terminal to automatic if not connected via proxy I tried to reset proxy of the terminal by some commands but it doesn't happen and automatically switches back to this proxy 172.16.0.16 (which apparently was my college proxy).   I checked in my system settings.I don't understand why this is recurring. Please be comprehensive.Also I further would like to know how to bypass proxy server since I couldn't access any of the ubuntu repositories as they were blocked in my college's proxy settings as is Ubuntu's homepage.  Thanks for your time.    For sudo ls /etc/apt/apt.conf.d/        It displays a different set of options where proxy is not listed.I am on 12.10,if this should help any.I put a snap of the terminal after the above command has been entered.