请帮小弟我看看这个char数组的利用子函数输入与输出的有关问题

请帮我看看这个char数组的利用子函数输入与输出的问题
这是C语言没有学好的结果,还是要请大家帮我提出错误。发在C++版,是因为正在学习C++。


#include <iostream>
#include <string>
using namespace std;

void fill(char **p, int size);
void show(char **p, int size);
int main()
{
    char name[3][10];
fill(name, 3);
show(name, 3);

return 0;
}

void fill(char **p, int size)  //建立字符串数组
{
for(int i=0; i<size; i++)
{
scanf("%s", *(p[i]));
}
}

void show(char **p, int size) //输出字符串数组
{
for(int i=0; i<size; i++)
{
printf("%s\n", *(p[i]));
}
}


总是有错误提示:‘
C:\Program Files\Microsoft Visual Studio\MyProjects\111\123.cpp(10) : error C2664: 'fill' : cannot convert parameter 1 from 'char [3][10]' to 'char ** '
        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
C:\Program Files\Microsoft Visual Studio\MyProjects\111\123.cpp(11) : error C2664: 'show' : cannot convert parameter 1 from 'char [3][10]' to 'char ** '
        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
执行 cl.exe 时出错.




------解决方案--------------------
int main() {
    char name[3][10];
fill(name, 3);
show(name, 3);
return 0;
}

void fill(char (*p)[10], int size) {  //建立字符串数组
for(int i=0; i<size; i++)
scanf("%s", p++);
}

void show(char (*p)[10], int size) { //输出字符串数组
for(int i=0; i<size; i++)
printf("%s\n", p++);
}