I get an error message at line 12 saying:
" expected `,' or `...' before ';' token "
" expected `)' before ';' token "
"expected unqualified-id before "const" "
is it just a semicolon mistake somewhere? or am i getting const correctness wrong??
This is unrelated to your problem, but you should not be passing by reference. The constructor should look like this:
histo(int nBin, float Min, float Max);
note I got rid of the &'s.
As for your error... are you #including <windows.h>? If yes, it #defines min and max, which means you can't use those as identifiers in your code. Note I changed the names above to 'Min' and 'Max' to avoid this conflict.
Generally one passes by reference in one of two cases: to save large amounts of space by avoiding the copying of a large variable (in which case a const is generally used for safety reasons), or if there's an intention of changing a variable being passed to the function. Neither appears to apply here, so there's no real need to pass by reference. :)
I made two changes to the code posted at 9:42 (added #endif to the end and changed max_P to max_p on line 34) and it compiles without any problem into a library.