title: fatal error: ll.h:No such file or directory
body: <p>I have two files ll.cpp and ll.h both in the same directory.</p>
  
  <p>ll.cpp</p>
  
  <pre><code>  #include &lt;ll.h&gt;
  
  #include &lt;iostream&gt;
  
  using namespace std;
  
  
  
  
      template &lt;class t&gt;
      LinkedL&lt;t&gt;::LinkedL()
       {
          flag=0;
          head=NULL;
          tail=NULL;
          curr=0;
      }
      template &lt;class t&gt;
      LinkedL&lt;t&gt;::void insertS(t inf)
      {
          Node&lt;t&gt; *n=new Node&lt;t&gt;;
          n-&gt;next=head;
          n-&gt;data=inf;
          head=n;
          if(curr==0)
              tail=n;
          curr++;
          //cout&lt;&lt;curr&lt;&lt;"\n";
      }
      template &lt;class t&gt;
      LinkedL&lt;t&gt;::void insertE(t inf)
      {
          Node&lt;t&gt; *n=new Node&lt;t&gt;;
          n-&gt;next=NULL;
          n-&gt;data=inf;
          if(curr!=0)
          tail-&gt;next=n;
          tail=n;
          if(curr==0)
              head=n;
          curr++;
          //cout&lt;&lt;curr&lt;&lt;"\n";
      }
      template &lt;class t&gt;
      LinkedL&lt;t&gt;::t delS()
      {
          if(curr&gt;=1)
          {
              flag=1;
              t temp=head-&gt;data;
              Node&lt;t&gt; *n=head;
              head=head-&gt;next;
              if(head==NULL)
                  tail=NULL;
              delete n;
              curr--;
              return temp;
          }
          else
          {
              cout&lt;&lt;"EMPTY LIST\n";
          }
      }
      template &lt;class t&gt;
      LinkedL&lt;t&gt;::t delE()
      {
  
          if(curr&gt;=1)
          {
              flag=1;
              Node&lt;t&gt; *n=head;
              t temp;
              if(curr&gt;1)
              {
                  while(n-&gt;next!=tail)
                      {   
                          //cout&lt;&lt;n-&gt;data&lt;&lt;" ";
                          n=n-&gt;next;
                      }
                      //cout&lt;&lt;"\n";
                  Node&lt;t&gt; *n1=tail;
                  temp=n1-&gt;data;
                  tail=n;
                  tail-&gt;next=NULL;
                  //cout&lt;&lt;n-&gt;data&lt;&lt;"\n";
                  delete n1;
                  }
                  else if(curr==1)
                  {
                      temp=tail-&gt;data;
                      delete tail;
                      head=NULL;
                      tail=NULL;
                  }
  
                  curr--;
                  //cout&lt;&lt;curr&lt;&lt;"\n";
                  return temp;
          }else if(curr==0)
          {
              cout&lt;&lt;"EMPTY LIST\n";
          }
  
      }
      template &lt;class t&gt;
      LinkedL&lt;t&gt;::bool search(t inf)
      {
          Node&lt;t&gt; *n=head;
          while(n!=NULL &amp;&amp; n-&gt;data!=inf)
              n=n-&gt;next;
          if(n==NULL)
              return false;
          return true;
      }
      template &lt;class t&gt;
      LinkedL&lt;t&gt;::void traverse()
      {
          if(curr!=0)
          {
              Node&lt;t&gt; *n=head;
              while(n!=NULL)
                  {
                  cout&lt;&lt;n-&gt;data&lt;&lt;" ";
                  n=n-&gt;next;
                  }
              cout&lt;&lt;'\n';
          }
          else
          {
              cout&lt;&lt;"EMPTY\n";
          }
      }
      template &lt;class t&gt;
      LinkedL&lt;t&gt;::bool isEmpty()
      {
          if(curr==0)
              return true;
          return false;
      }
      template &lt;class t&gt;
      LinkedL&lt;t&gt;::t at(int i)
      {
          if(i&lt;=curr)
          {
              flag=1;
              Node&lt;t&gt; *n=head;
              int k=1;
              while(k!=i)
              {
                  n=n-&gt;next;
                  k++;
              }
              return n-&gt;data;
          }
          else
              cout&lt;&lt;"Invalid Index\n";
      }
      template &lt;class t&gt;
      LinkedL&lt;t&gt;::void insert(int i,t dat)
      {
          if(i&lt;=curr+1)
          {
              flag=1;
              if(curr==0 || i==1)
              {
                  insertS(dat);
              }
              else
              {
                  Node&lt;t&gt; *n1=NULL;
                  Node&lt;t&gt; *n=head;
                  int k=1;
                  while(k!=i)
                  {
                      n1=n;
                      n=n-&gt;next;
                      k++;
                  }
                  Node&lt;t&gt; *temp=new Node&lt;t&gt;;
                  temp-&gt;next=n;
                  n1-&gt;next=temp;
                  temp-&gt;data=dat;
                  curr++;
              }
          }
          else
              cout&lt;&lt;"Invalid Index\n";
      }
      template &lt;class t&gt;
      LinkedL&lt;t&gt;::void reverse()
      {
          if(curr!=0)
          {
              Node&lt;t&gt; *n=head;
              Node&lt;t&gt; *n1=head;
              Node&lt;t&gt; *n2=NULL;
              while(n!=NULL)
              {
                  n1=n-&gt;next;
                  n-&gt;next=n2;
                  n2=n;
                  n=n1;
              }
              n=head;
              head=tail;
              tail=n;
          }
      }
      template &lt;class t&gt;
      LinkedL&lt;t&gt;::t delet(int i)
      {
          Node&lt;t&gt; *n=head;
          if(head!=NULL &amp;&amp; i&lt;=curr)
          {
              flag=1;
              t dat;
              int k=1;
              if(i==1)
                  dat=delS();
              else
              {
                  while(k!=i-1)
                      {
                          n=n-&gt;next;
                          k++;
                      }
                  Node&lt;t&gt; *n1=n-&gt;next;
                  n-&gt;next=n-&gt;next-&gt;next;
                  dat=n1-&gt;data;
                  delete n1;
              }
              curr--;
              return dat;
          }
          else
          {
              cout&lt;&lt;"Invalid Index\n";
          }
      }
  </code></pre>
  
  <p>ll.h</p>
  
  <pre><code>   #ifndef LL_H
  #define LL_H
  
  template &lt;class t&gt;
  class Node
  {
      public:
      Node&lt;t&gt; * next;
      t data;
  };
  
  
  template &lt;class t&gt;
  class LinkedL
  {
      private:
          Node&lt;t&gt;* head;
          Node&lt;t&gt;* tail;
          int curr;
      public:
       int flag; 
       LinkedL();
  
      void insertS(t inf);
  
      void insertE(t inf);
  
      t delS();
  
      t delE();
  
      bool search(t inf);
  
      void traverse();
  
  
      bool isEmpty();
  
      t at(int i);
  
      void insert(int i,t dat);
  
      void reverse();
  
      t delet(int i);
  
  
  };
  #endif
  </code></pre>
  
  <p>I am not able to figure out why the compiler is giving this error. Same thing is happening for all the .h and .cpp pairs as a crosscheck I changed the permission to rwx for all users but still the same error is coming. Please help.</p>