This is the first errormessage that I get trying to compile your code
meaning min is a template in c++.Code:lcd.cc: In function `int main()': lcd.cc:13: error: overloaded function with no contextual type information
use a different variable name.
Kurt