I dont know whats wrong with my code so ig anyone could please help me i keep getting segmetation fault
#include<stdio.h>
int main(){
char s[100];
FILE*f=fopen("rec1.txt","r");
if(f==NULL)printf("greska");
FILE*g=fopen("reci2.txt","w");
if(g==NULL)printf("greska");
while(fscanf(f,"%s",s)!=EOF){
fprintf(g,"%s",s);}
fclose(f);
fclose(g);
}
Segmentation fault please help
Started by summoner90, Feb 04 2010 03:01 PM
2 replies to this topic


Sign In
Create Account

Back to top









