这个错误是由于试图使用一个int类型的值来初始化一个非常量限定的CString&类型引用而引起的。在这种情况下,您需要将int值转换为对应的字符串类型,然后再将其赋值给CString对象。 以下是一个示例: intintValue=42; CStringstrValue; strValue.Format(_T("%d"),intValue);// 将 int 值转换为 CString 对象 // ...