在写参数的时候,对于不需要改变的参数,如int,不需要定义为const,如果为结构体,一般定义为引用,如果不希望杯改变还需要定义为const。 转载于:https://my.oschina.net/u/174876/blog/98780