Implement ostream<< operator, add const version of [] operator