     }
   }
 
-  T calcError( vector<T> &targets )
+  T calcError( Vector<T> &targets )
   {
     T netErr = (T)0.0, delta;
     // minus bias

  T _momentum;
  Layer<T> *_inLayer, *_outLayer;

  vector<Layer<T>*> layers;

  vector<T> vecBackPrepTargets;

  NeuralNet( T learn_rate = 0.0001, T momentum = 0.001 )
: 
    _learnRate( learn_rate ), _momentum( momentum )
    {

    return sum;
  }

  void calcGradient( Vector<T> &targets )
  {
    if( nextLayer == NULL )	 // output layer
    {
