cout << cr += 2 << endl;endl;会标红,提示:无法确定需要哪个 函数模板“std::endl”实例。更改为:cout << (cr+=2) << endl;就可将错误提示解除。暂没理解为何会出现这样的问题。