sprintf(要写入的字符串,“表达”,变量名称) sprintf(class_period,"%s%s-%s",add.class_day, add.class_start, add.class_end);