'function': 格式字串中的 'format specifier' 與引數數目 (屬於類型 'type') 衝突
備註
指定的格式與您所傳遞的值之間沒有衝突。 例如,您傳遞 64 位元的參數至未限定的 %d 格式規範,但其預期的是 32 位元的整數參數。 當程式碼是針對 64 位元目標編譯時,這個警告才有效。
範例
以下程式碼範例在編譯為 64 位目標時會產生 C4313。
// C4313.cpp
// Compile by using: cl /W1 C4313.cpp
#include <stdio.h>
int main() {
int * pI = 0;
printf("%d", pI); // C4313 on 64-bit platform code
// Try one of the following lines instead:
// printf("%p\n", pI);
// printf("%Id\n", pI); // %I64d expects 64-bits of information
}