Hi everyone,
i have a problem but my english is poor, i'm sorry for this.
i want to make a string array from strings in a text file.
i try to do this but i couldn't do, where is my mistake?
Sorry again for my bad english.
Code:
#include <stdio.h>
#include <stdlib.h>
int main(){
char cumle[100],*c,*dene[50];
FILE *input;
input=fopen("input.txt","r");
//i want to partition this string line by line
int a=0;
while (c != NULL){
c=fgets(cumle,100,input);
if (c != NULL)
dene[a]=cumle;
a++;
}
/*
//this is print all lines
while (c != NULL){
c=fgets(cumle,100,input);
if (c != NULL)
printf("%s",cumle);
}
*/
return 0;
}