Re: [Linux-programlama] pointer

---------

New Message Reply About this list Date view Thread view Subject view Author view Attachment view

From: Ustun ERGENOGLU (ustun.ergenoglu@gmail.com)
Date: Sun 16 Jul 2006 - 14:18:18 GMT


yapmaya çalıştığınız şey sanırım p1 pointerini bir integer boyu
arttırıp d2 ye ulaşmak. bu derleyiciden derleyiciye hatta aynı
derleyicide kullanılan seçeneklere gore değişebilen bir durum. az once
denedim d1 ve d2 nin adreslerini yazdırdığımda peşpeşe değiller, bu
gcc'nin optimizasyon ya da farklı bir sebepten dolayı yaptığı birşey
olmalı. programınız bu yüzden erişme hakkı olmayan bir adrese erişmeye
çalışıp hata veriyor olmalı.

2006/7/16, ahmet demir <turkosx@gmail.com>:
>
>
> #include <stdio.h>
> main()
> {
> int *p1;
> int d1,d2;
> d1=10;
> d2=20;
> p1=&d1;
> printf("%d\n",*p1);
> p1++;
> printf("%d\n",*p1);
> }
>
> Bu basit uygulama win uzerinde basarili bir sekilde calisirken linux
> uzerinde dogru calismiyor bunun sebebi nedir?
> _______________________________________________
> Linux-programlama mailing list
> Linux-programlama@liste.linux.org.tr
> http://liste.linux.org.tr/mailman/listinfo/linux-programlama
>
>
>

_______________________________________________
Linux-programlama mailing list
Linux-programlama@liste.linux.org.tr
http://liste.linux.org.tr/mailman/listinfo/linux-programlama


New Message Reply About this list Date view Thread view Subject view Author view Attachment view

---------

Bu arsiv hypermail 2.1.2 tarafindan uretilmistir.