Hi, everybody:
when I use sort() to rank a vector, there is problem like below.
By the way, my system is opnsuse11.4. and root version 5.30-6
“Internal error: template function call __unguarded_partition failed algo.h:725:”
I adhere the code.
#include
#include
#include
#include <math.h>
using namespace std;
void test()
{
std::vector temp;
temp.push_back(2);
temp.push_back(4);
temp.push_back(5);
temp.push_back(1);
cout<<temp[0]<<" “<<temp[1]<<” “<<temp[2]<<” “<<temp[3]<<endl;
sort(temp.begin(),temp.end());
cout<<temp[0]<<” “<<temp[1]<<” “<<temp[2]<<” "<<temp[3]<<endl;
}
root -l test.cxx
Processing test.cxx…
2 4 5 1
Internal error: template function call __unguarded_partition failed algo.h:725:
*** Interpreter error recovered ***