Guys,
DO you know why I got segmentation fault on this piece of code?
Thanks,
Amir.
DO you know why I got segmentation fault on this piece of code?
Code:
char p[]={68,69,98,112,105}; char *p1; for (int i=0; i<5; i++) p1[i]=p[i]; p1[5]='\0'; cout << p1<<endl;
Amir.
Comment