title: C++ making a template class as place holder in another class
body: <p>I am trying to make a template class as placeholder class which can hold something like and string and type T object. Below is the code which I have written for the same.</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;string&gt;
  #include &lt;map&gt;
  
  using namespace std;
  
  //A class which act as placeholder to hold
  //unknown object. Something similar as Object
  //in Java
  template &lt;typename T&gt;
  class Genric
  {
      public:
          map&lt;string, T&gt; addP; //This will be placeholder for time
          // being.
  };
  
  class A
  {
      public:
          Genric t1; //Have object of Genric class so that we can
          // access the member variable in future.
          void foo()
          {
              cout&lt;&lt;"Calling foo"&lt;&lt;endl;
          }
  };
  
  int main()
  {
      A a1;
      a1.foo();
  }
  </code></pre>
  
  <p>But when I tried to compile I am getting below error.</p>
  
  <pre><code>$ g++ tempClass.cxx
  tempClass.cxx:21:9: error: invalid use of template-name 'Genric' without an argument list
  </code></pre>
  
  <p>The purpose of above Genric class is just to act as placeholder class for one of the member variables which can be populated in future.
  So is there a way we can write such Genric class.</p>