नोट
इस पृष्ठ तक पहुंच के लिए प्राधिकरण की आवश्यकता होती है। आप साइन इन करने या निर्देशिकाएँ बदलने का प्रयास कर सकते हैं।
इस पृष्ठ तक पहुंच के लिए प्राधिकरण की आवश्यकता होती है। आप निर्देशिकाएँ बदलने का प्रयास कर सकते हैं।
'var' : conversion from 'size_t' to 'type', possible loss of data
Remarks
The compiler detected a conversion from size_t to a smaller type.
To fix this warning, use size_t instead of type. Alternatively, use an integral type that is at least as large as size_t.
Example
The following example generates C4267.
// C4267.cpp
// compile by using: cl /W4 C4267.cpp
void Func1(short) {}
void Func2(int) {}
void Func3(long) {}
void Func4(size_t) {}
int main() {
size_t bufferSize = 10;
Func1(bufferSize); // C4267 for all platforms
Func2(bufferSize); // C4267 only for 64-bit platforms
Func3(bufferSize); // C4267 only for 64-bit platforms
Func4(bufferSize); // OK for all platforms
}