Vector, algorithm and sort

#include <vector>
#include <algorithm>
using namespace std;

vector<int> trmVa;
  ........
  ........
  ........
sort(trmVa.begin(), trmVa.end()); // Why is root complaining? Error below.

Error: operator- not defined for vector<int,allocator >::iterator . Do we have a similar function in root that does sorting array elements. I am using Root 5.20 Thanks in advance.

f.

Again you need to compile with ACLIC or use TMath::Sort

see root.cern.ch/root/html/TMath.html

Lorenzo