S l a s h 1
New member
עזרה בשפת C
היי לכולם,
אני מנסה להריץ פונקציה, וקופצת לי שגיאה שאני לא יודעת מה היא אומרת.
אשמח לעזרתכם.
Unhandled exception at 0x77ea158e in targil3p168.exe: 0xC0000005: Access violation.
הפונקציה:
|void modify(int *p)
{
while(*p<10)
{
p++;
*p=*(p-1)=*(p-2);
}
}
main()
{
int i;
int arr[10]={0};
arr[1]=1;
modify(arr+1);
for(i=0;i<10;i++)
printf("%d",arr);
}|
היי לכולם,
אני מנסה להריץ פונקציה, וקופצת לי שגיאה שאני לא יודעת מה היא אומרת.
אשמח לעזרתכם.
Unhandled exception at 0x77ea158e in targil3p168.exe: 0xC0000005: Access violation.
הפונקציה:
|void modify(int *p)
{
while(*p<10)
{
p++;
*p=*(p-1)=*(p-2);
}
}
main()
{
int i;
int arr[10]={0};
arr[1]=1;
modify(arr+1);
for(i=0;i<10;i++)
printf("%d",arr);
}|