title: Expected class-name before { token - very simple
body: <p>I've seen many answers for this question, know what to look for and still can see that. Looks like some obvious problem.</p>
  
  <p>Algorithm.h:</p>
  
  <pre><code>#ifndef ALGORITHM_H
  #define ALGORITHM_H
  
  #include &lt;iostream&gt;
  using namespace std;
  
  template &lt;typename T&gt;
  
  class Algorithm
  {
  private:
      T data;
      T result;
  public:
      Algorithm(T in){
          data = in;
      }
  
      void compute();
  
      void displayData(){
          cout&lt;&lt;data&lt;&lt;endl;
      }
  
      T getResult(){
          return result;
      }
  };
  
  #endif // ALGORITHM_H
  </code></pre>
  
  <p>Bubble.h:</p>
  
  <pre><code>#ifndef BUBBLE_H
  #define BUBBLE_H
  
  #include "algorithm.h"
  
  class Bubble : public Algorithm{
  public:
      Bubble();
  };
  
  #endif // BUBBLE_H
  </code></pre>
  
  <p>main.cpp</p>
  
  <pre><code>#include "bubble.h"
  #include &lt;iostream&gt;
  using namespace std;
  
  int main()
  {
      Algorithm&lt;int&gt; a(1);
      Algorithm&lt;char&gt; b('a');
  
      a.displayData();
      b.displayData();
  
  
      return 0;
  }
  </code></pre>
  
  <p>Error is: </p>
  
  <blockquote>
    <p>/home/user/Projects/Algorithms/main.cpp:1: In file included from
    ../Algorithms/main.cpp:1:0: /home/user/Projects/Algorithms/bubble.h:6:
    error: expected class-name before '{' token  class Bubble : public
    Algorithm{
                                    ^</p>
  </blockquote>
  
  <p>Why compiler cannot see Algorithm class? I included it in Bubble.h, so?</p>