求教关于编译器对参数检查的问题
#include <stdio.h>
void test(const char * p1,const char * p2)
{
;
}
void main()
{
const char * p1 = "hello";
const char * p2 = "nihao";
const char * p3 = "nihao";
test(p1,p2,p3);
system("pause");
}
将此代码贴在vs2008上并将后缀改为.c则运行无误,若为.cpp则必报错。
请问这是和vs2008对不同类型源文件的参数检查不同吗