摘要: 如下语句将出现编译错误: 正确的用法是: 如果函数返回值采用“值传递方式”,由于函数会把返回值复制到外部临时的存储单元中,加const修饰没有任何价值。 例如: 不要将函数 int GetInt(void) 写成 const int GetInt(void)。 同理不要把函数A GetA(void) 阅读全文
posted @ 2019-06-19 14:41 Mr_Song_D 阅读(7687) 评论(1) 推荐(0) 编辑