Q:

C++ compiling error template-related

I'm a newbie in c++ and I have this piece of code:
#include "passenger.h"
#include "plane_list.h"

int main(){
  plane_list<T>::plane_list();
  plane_list<T>::add();
}

and I don't understand nor can I seem to find an answer online why I get these errors:

error: ‘T’ was not declared in this scope
  plane_list::plane_list();
error: template argument 1 is invalid
  plane_list::plane_list();
error: invalid type in declaration before ‘;’ token
  plane_list::plane_list(); 
error: ‘::add’ has not been declared
  plane_list::add();

This is the header file:
template <class T> class plane_list{
friend class planes;
public:
  plane_list();
  ~plane_list();
  int search(const std::string &flight_code);
  plane_list<T> del(const std::string &flight_code);
  plane_list<T> add();

private:
  T *element;
  int length;

};

template <class T> plane_list<T>::plane_list(){
  element = new T[100];
  length=0;
}

template <class T> int plane_list<T>::search(const std::string &flight_code){
  for(int i=0;i<length;i++)if(element[i]._flight_code==flight_code)return i;
  return 0;
}

template <class T> plane_list<T> plane_list<T>::del(const std::string &flight_code){
  if(search(flight_code)!=0){
    for(int i=search(flight_code); i<length; i++)element[i-1]=element[i];
    length--;
    return *this;
  }
  else
    std::cerr<<"Did not find flight"<<std::endl;
}

template <class T> plane_list<T> plane_list<T>::add(){
  element[length]=planes::planes();
  length++;
  return *this;
}

Any help would be appreciated.

A:

The issue is that there is no type T. I am assuming that plane_list is some template class like this:
template<typename T>
class plane_list{
//...
}

Here the typename T is a placeholder for some type that will be provided when you instantiate the class. 
You are getting an error because you are trying to instantiate the plane_list with a type that does not exists.
To use your class correctly you need to change T to some other type:
//for example you could use an int
int main(){
  plane_list<int>::plane_list();
  plane_list<int>::add();
}

Without knowing the contents of plane_list.h I cannot infer what you are actually trying to do.
EDIT: 
As suggested in the comments. You are using the incorrect syntax for instantiating and using your variable. The correct usage would be:
int main(int argc, char** argv){
  //create a variable of type plane_list<int> names "list:
  plane_list<int> list; //default constructor is called automatically

  list.add(); ///call the member function "add"
}

Additionally your code has a memory leak, you allocate the array 'element' with dynamic storage by calling new in your constructor, but never call delete element anywhere which causes the leak. There are several ways to fix this:

Add a destructor and call delete element in it.
Use std::vector<T> if you need to resize the array.
Use std::unique_ptr<T> if you need a fixed length array of runtime determined length.
Don't use dynamic memory since you are allocating an array with compile time size.

I will not provide an example of each of these, but I would recommend reading up on memory management in C++.
Go through your header and be sure to correct the your function call syntax. There are a few places where you are using the same incorrect syntax within your class. For example: 
template <class T> plane_list<T> plane_list<T>::add(){
  //element[length]=planes::planes();
  element[length]=planes{}; //default initialize a "planes" object
  length++;
  return *this;
}

