指针数组处理字符串(如:char *s[] = { "Hello","World","!" };)Visual Studio 2017无法正常编译 出现错误error C2440: “初始化”: 无法从“const char [6]”转换为“char *”

指针数组处理字符串(如:char *s[] = {

问题描述:

#include<stdio.h>

int main(void)
{
    int i;
    char *s[] = { "Hello","World","!" };
    for (i = 0; i < sizeof(s); i++)
        printf("%s\n", s[i]);
    return 0;
}

直接给数组指针赋值 char *s[] = { "Hello","World","!" };,这个代码是正确的,使用Visual Studio 2010时能正常运行,但是在Visual Studio 2017中却检测有错误,无法运行,请问是标准或者什么变了吗?原因是什么?怎么解决在Visual Studio 2017运行中出现的这个问题?谢谢!
图片说明

"Hello","World","!"是常量字符串,加上const符合c语言标准。
const char *s[] = { "Hello","World","!" };
for (i = 0; i < sizeof(s)/sizeof(char * ); i++) 得到数组s长度