I have created another function and the looks like this now but it still does not work...
I still getting the size error...Code:VOID writeALL(void) {
FILE *fp;
fp = fopen("stockdb.txt", "r");
char c;
struct stock stk1;
while((fscanf(fp, "%s %s %s %d%c",stk1.name,stk1. code,stk1.price, &stk1.quantity,&c)) > 3) {
printf("%s %s %s %d \n", stk1.name,stk1.code,stk1.price,stk1.quantity);
}
fclose(fp);
getch();