To start off I should say that I am new to ROOT and fairly new to c++. I have written a macro for pulling out the maximum value in a vector array shown here:
double maxvalue(std::vector<double> array)
length = array.size();
int max = array;
for (int i=0; i<length; i++)
I can’t see anything wrong with this code but everytime I try to run it this error gets returned:
Error: Missing closing brace for the block opened around line 3.
Error: Unexpected end of file (G__exec_statement()) /home/stephen/snoing/csvfiles/maxvalue.C:15:
I checked my braces and used brace matching on emacs (even though its only 3 braces). Does anyone have any idea why this is happening?
ps: I know this doesn’t contain ROOT specific problems but I couldn’t think of any other reason for it not working than an issue with CINT.