system()

NooBiouZ the UnstoPPaBLouZ SeXiouZ maChinouZ noob at andromeda.delta.edu.gr
Mon Aug 23 08:08:59 EEST 1999


thanx all gia th boitheia....
brika telikws th lysh alla oxi sthn fgets alla sketo gets
thanx pou me balate se swsto dromo 

Ap'oti diabasa gia thn fgets diabazei ena string apo ena arxeio 
kai den mou xreiazetai...afou den thelw na diabasw apo arxeio 
apla to string tha to kataxwrhsw se ena txt mesw ths system...
me thn gets einai polu eukolo arkei na kaneis ta ekshs:

#include <stdio.h>
#define data 
main()
{
        char album[data];
        printf("dwse to onoma tou album:");
        gets(album);  /* thanx for the hint edw.... */
        puts(album);

}


kai typwnei akribws to string pou thelw....
btw epeidi sthn arxh ebaza sthn printf na typwsei string kai oxi character mou ebgaze 
segmentation fault giauto to allaksa...

To pws tha to metaferw auto to string se shell command paramenei to 
problima.... 

P.S: Hmmm....twra pou to skeftomai sta melontika mou sxedia gia to proggie 
     mou xreiazetai i fgets afou tha prosthesw kai search database kai tha prepei na 
     diabasei to arxeio gia na brei to album....alla mexri tote tha mou exei katsei kai 
     h Angelina Jolie... 

P.P.S: Angelina Jolie aka Hackers :-) 

--
====================================================================
Gia boithia (h na diagrafhte) e-mail sto majordomo at hellug.gr
Ta archives tis listas einai sto http://lists.hellug.gr/archives
prin steilete kapoia erothsh psakte mipos exei hdh apanththei.
Gia opoiodipote problima stilte e-mail ston owner-linux-greek-users at hellug.gr
====================================================================



More information about the Linux-greek-users mailing list