在code::blocks 下运行如下代码
#include <stdio.h>
#include <stdlib.h>
int main(void)
{
int a = 100;
printf("dec = %d; octal = %#0; hex = %#0x\n",a,a,a);
printf("dec = %d; octal = %0; hex = %0x\n",a,a,a);
return 0;
}
出现 OC\main.c|7|warning: unknown conversion type character ';' in format [-Wformat]|的警告
原来我把octal = %#0 和 octal = %0 的o(欧)输成0(零)了,好低级的错误!!!