Warning C26496
The variable 'variable' is assigned only once, mark it as
const
.
See also
Example
int GetTheNumber();
int GiveMeTheNumber(int);
void function1()
{
int theNumber = GetTheNumber(); // C26496, 'theNumber' is never assigned to again, so it can be marked as const
std::cout << theNumber << '\n';
GiveMeTheNumber(theNumber);
// ...
}
משוב
https://aka.ms/ContentUserFeedback.
בקרוב: במהלך 2024, נפתור בעיות GitHub כמנגנון המשוב לתוכן ונחליף אותו במערכת משוב חדשה. לקבלת מידע נוסף, ראה:שלח והצג משוב עבור