Made Field a template
Field is a template that can take any type
Use the stringstream to make type independent writes
Replace printf by stringstream