#include <stdio.h>
#include <stdlib.h>
#include <string.h>
main()
{
char *p1[12]; // 迭 p1
char *p=(char*)malloc(sizeof(char)*12);// p
strcpy(p1,"haaaaa"); // <- κп ϴ.
strcpy(p,"hohoho");
}
P1 P Ŷ ߴµ
VC غ Ʒ ߴ
warning C4047: 'Լ' : 'char *' 'char *[12]'() ٸϴ.
warning C4024: 'strcpy' : Ű 1 ٸϴ.
Q. ̷ ٴ P1 P ٸٴ ǵ ٸ
˰ ͽϴ.
|