From: Bülent Erdemir (buler@kocbank.com.tr)
Date: Mon 03 Feb 2003 - 11:12:33 EET
fscanf(stdin,"%s",&text);
satirinda & isareti kullanmamalisiniz. Dogrusu=20
fscanf(stdin,"%s",text);
olmali.=20
& kullandiginiz zaman bir pointer'in adresini gondermis oluyorsunuz. int
degiskenlerde & kullanabilirsiniz, ancak scanf fonksiyonuna verdiginiz
parametre zaten bir pointer ise direkt kendi ismini yazmalisiniz.
B=FClent Erdemir
Sistem Teknoloji
Ko=E7bank A.=DE.
0.216.454 06 00 / 4616
-----Original Message-----
From: Bora Tuncer [mailto:bora_tuncer2000@yahoo.com]=20
Sent: Sunday, February 02, 2003 9:31 PM
To: linux@linux.org.tr
Subject: [Linux] Re: gcc ---ufak bir hata
selamlar
sorumu yan=FDtlad=FD=F0=FDn i=E7in te=FE=FEekk=FCr ederim ama ben kodu
yanl=FD=FE eklemi=FEim senin dedi=F0in =FEeyler olmadan zaten
kod derlenmezdi :D
fakat &text yerine sadece text kulland=FD=F0=FDmdada sorun
de=F0i=FEmedi ??? Yard=FDmlar=FDn=FD acil olarak bekliyorum,kodu
a=FEa=F0=FDda gene koydum
birde windowmaker(window(s)maker yazm=FD=FE=FDm al=FD=FEkanl=FDk)
i=E7in grafik ayarlar=FDn=FD yapan bir program feya asl=FDnda
senin dedi=F0in gibi X ayarlar=FDn=FDn nas=FDl yap=FDld=FD=F0=FDn=FD
anlatan bir d=F6k=FCman bulabilirmiyim, adresi ???
iyi =E7al=FD=FEmalar
//-------------------------------------------
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main()
{
char *text,a;
int i,j,sayac=3D0,temp;
int dizi[100][3];=09
=20
text=3D(char*) malloc(150);
=20
printf("Huffman Coding =D6rnegi\n");
printf("Text : ");
fscanf(stdin,"%s",&text);
=20
//dizideki t=FCm frekanslar sifirlaniyor
for(i=3D0;i<100;i++){
dizi[i][1]=3D0;
}
dizi[0][0]=3Dtext[0]; //dizinin ilk eleman ataniyor ve
baslangic frekansi bir yapiliyor
dizi[0][1]=3D1;
sayac=3D1;
=20
printf("%s\n",text);
for(i=3D1;i<strlen(text);i++){
printf("%d---",sayac);
for(j=3D0;j<sayac;j++){
temp=3Dtext[i];
if(temp=3D=3Ddizi[j][0]){
dizi[j][1]++;
break;
}
}
if(j=3D=3Dsayac){ // eger daha =F6nce
karsilasilmis bir frekans yoksa
dizi[j][0]=3Dtemp;
dizi[j][1]=3D1;
}
sayac++;
}
=20
for(i=3D0;i<sayac;i++){
// printf("%c - %d ",dizi[i][0],dizi[i][1]);
}
a=3Dgetc(stdin);
return 0;
}
__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
-----------------------------------------------------------------------
Liste =FCyeli=F0iniz ile ilgili her t=FCrl=FC i=FElem i=E7in =
http://liste.linux.org.tr
adresindeki web aray=FCz=FCn=FC kullanabilirsiniz.
Listeden =E7=FDkmak i=E7in: 'linux-request@linux.org.tr' adresine, =
"Konu" k=FDsm=FDnda
"unsubscribe" yazan bir e-posta g=F6nderiniz.
-----------------------------------------------------------------------
Bu mesaj ve onunla iletilen t=FCm ekler g=F6nderildigi kisi ya da kuruma =
=F6zel ve Bankalar Kanunu geregince, gizlilik y=FCk=FCml=FCl=FCg=FC =
tasiyor olabilir. Bu mesaj, hi=E7bir sekilde, herhangi bir ama=E7 i=E7in =
=E7ogaltilamaz, yayinlanamaz ve para karsiligi satilamaz; mesajin =
yetkili alicisi veya alicisina iletmekten sorumlu kisi degilseniz, mesaj =
i=E7erigini ya da eklerini kopyalamayiniz, yayinlamayiniz, baska =
kisilere y=F6nlendirmeyiniz ve mesaji g=F6nderen kisiyi derhal uyararak =
bu mesaji siliniz. Bu mesajin i=E7eriginde ya da eklerinde yer alan =
bilgilerin dogrulugu, b=FCt=FCnl=FCg=FC ve g=FCncelligi Bankamiz =
tarafindan garanti edilmemektedir ve bilinen vir=FCslere karsi =
kontrolleri yapilmis olarak yollanan mesajin sisteminizde yaratabilecegi =
zararlardan Bankamiz sorumlu tutulamaz.
This message and the files attached to it are under the privacy =
liability in accordance with the Banking Law and confidential to the use =
of the individual or entity to whom they are addressed. This message =
cannot be copied, disclosed or sold monetary consideration for any =
purpose. If you are not the intended recipient of this message, you =
should not copy, distribute, disclose or forward the information that =
exists in the content and in the attachments of this message; please =
notify the sender immediately and delete all copies of this message. Our =
Bank does not warrant the accuracy, integrity and currency of the =
information transmitted with this message. This message has been =
detected for all known computer viruses thence our Bank is not liable =
for the occurrence of any system corruption caused by this message.
-----------------------------------------------------------------------
Liste üyeliğiniz ile ilgili her türlü işlem için
http://liste.linux.org.tr adresindeki web arayüzünü kullanabilirsiniz.
Listeden çıkmak için: 'linux-request@linux.org.tr' adresine,
"Konu" kısmında "unsubscribe" yazan bir e-posta gönderiniz.
-----------------------------------------------------------------------