TASOS60 Δημοσ. 13 Ιουνίου 2003 Δημοσ. 13 Ιουνίου 2003 kano programatismo stin c kai polles fores kata thn ektelesi enos programmatos me emfanizei h mnimi den mporei na einai "write" h "read" ftaine oi entoles h kati allo; <img src="http://www.insomnia.gr/ubbthreads/images/graemlins/confused.gif" alt="" />
Billman Δημοσ. 13 Ιουνίου 2003 Δημοσ. 13 Ιουνίου 2003 Το πιο πιθανό είναι ότι έχεις βγει εκτός ορίων κάποιου πίνακα που χρησιμοποιείς και διαβάζεις/γράφεις κάποια θέση στην οποία δεν έχει access το πρόγραμμα σου.
md_agis Δημοσ. 13 Ιουνίου 2003 Δημοσ. 13 Ιουνίου 2003 An thes gine poio sygekrimenos kai pes mas ti compiler douleueis
thunderB Δημοσ. 13 Ιουνίου 2003 Δημοσ. 13 Ιουνίου 2003 ke akoma pio sigkrimenos dixnodas ton code(an thes vevea)...einai pio efkolo na kanoume debug etsi.
TASOS60 Δημοσ. 13 Ιουνίου 2003 Μέλος Δημοσ. 13 Ιουνίου 2003 to programma einai ayto anoigo kapoio arxeio kai topotheto kapia dedomena sto telos thelo na emfaniso to teleyteo gramma toy epithetou #include<stdio.h> main() { int afm,counter=0; char name[12],epith[25],artau[7],ch; FILE*fpa; /*diniourgia arxeiou*/ if((fpa=fopen("myfile.txt","w"))==NULL) { printf("can't creat the file try again\n"); exit(1); } /*diabasma timon*/ printf("dose to onoma\n"); gets(name); printf("dose to epitheto\n"); scanf("%s",epith); printf("dose to AFM\n"); scanf("%d",&afm); printf("dose ton arithmo taytotitas\n"); scanf("%s",artau); /*topothetisi timon sto arxeio*/ fprintf(fpa,"%s %s %d %s",name,epith,afm,artau); fclose(fpa); /*anoigei ksana to arxeio*/ if((fpa=fopen("myfile.txt","r"))==NULL) { printf("can't opent the file try again\n"); exit(1); } /*grafpimo ton zhtoumenon dedomenon*/ fscanf(fpca"%1s %s %d %s",name,epith,&afm,artau); printf("to proto grama toy onomatos einai:\n %s\n",name); printf("to teleyteo tou epithetou einai:\n %s\n",epith[1]); } prospotho esto na emfaniso to epith[1] kai me me bgainei h mnimi den mporei na einai read eno plikrologo ena epitheto esto tasos min didenete shmasia se perites deiloseis poy exo to programa zitoyse kai alla poy den htan aparetita na ta anafero xreisimopoio to Microsoft Visual Studio(Microsoft Visual C++6.0)
tasoss Δημοσ. 16 Ιουνίου 2003 Δημοσ. 16 Ιουνίου 2003 xoris elegxous ktl apla dior8osa oti ekanes (episis o kodikas etsi opos ton dinis den ginete compile exi la8i!) #include<stdio.h> #include <stdlib.h> void main() { int afm,counter=0; char name[12],epith[25],artau[7],ch; FILE*fpa; /*diniourgia arxeiou*/ if((fpa=fopen("myfile.txt","w"))==NULL) { printf("can't creat the file try again\n"); exit(1); } /*diabasma timon*/ printf("dose to onoma\n"); gets(name); printf("dose to epitheto\n"); scanf("%s",epith); printf("dose to AFM\n"); scanf("%d",&afm); printf("dose ton arithmo taytotitas\n"); scanf("%s",artau); /*topothetisi timon sto arxeio*/ fprintf(fpa,"%s %s %d %s",name,epith,afm,artau); fclose(fpa); /*anoigei ksana to arxeio*/ if((fpa=fopen("myfile.txt","r"))==NULL) { printf("can't opent the file try again\n"); exit(1); } /*grafpimo ton zhtoumenon dedomenon*/ fscanf(fpa,"%s %s %d %s",name,epith,&afm,artau); printf("to proto grama toy onomatos einai:\n %c\n",name[0]); int x=0; while(epith[x]!='\0') { x++; } printf("to teleyteo tou epithetou einai:\n %c\n",epith[x-1]); }
TASOS60 Δημοσ. 16 Ιουνίου 2003 Μέλος Δημοσ. 16 Ιουνίου 2003 ok thanks <img src="http://www.insomnia.gr/ubbthreads/images/graemlins/cool.gif" alt="" /> <img src="http://www.insomnia.gr/ubbthreads/images/graemlins/cool.gif" alt="" /> ---------------- Γράφτε Ελληνικά, η γλώσσα μας κινδυνεύει.
Προτεινόμενες αναρτήσεις
Αρχειοθετημένο
Αυτό το θέμα έχει αρχειοθετηθεί και είναι κλειστό για περαιτέρω απαντήσεις.