- 论坛徽章:
- 0
|
小弟最近复习,好多基础忘记了
#include<stdio.h>
#define LEN 10
#define ROW 3
void fun(char ** arr, int n);
int main(void)
{
char arr[LEN][15] = { "look out", "hurry up", "don't worry" };
fun(arr, ROW);
return 0;
}
void fun(char (*arr)[15], int n)
{
char *temp[ROW];
int i;
for(i = 0; i < n; i++)
{
temp[i] = arr[i];
printf("%s\n", temp[i]);
}
}
warning C4047: 'function' : 'char ** ' differs in levels of indirection from 'char [10][15]'
warning C4024: 'fun' : different types for formal and actual parameter 1
warning C4028: formal parameter 1 different from declaratio小弟这段时间复习,因为好长时间没看,好多基础都忘记了。 |
|