snprintf for all classes