rendered paste body #include <stdio.h> #include <stdlib.h> #include <string.h> int main(int argc, char* argv[]) { FILE *fp; int x=0; char* str=malloc(sizeof(char)*512); char* file=malloc(sizeof(char)*100); char* junk=malloc(sizeof(char)*10000); char* select_ats=malloc(sizeof(char)*10000); char* num_group_var=malloc(sizeof(char)*10); char* group_ats=malloc(sizeof(char)*10000); char* f_vect=malloc(sizeof(char)*10000); char** select_cond=(char**)malloc(sizeof(char*)*100); int q=0; for(q=0;q<100;q++) { select_cond[q]=malloc(sizeof(char)*10000); } printf("File name containing query:\n"); scanf("%s",str); fp=fopen(str, "r"); fgets(junk,10000,fp); fgets(select_ats,10000,fp); fgets(junk,10000,fp); fgets(num_group_var,10,fp); fgets(junk,10000,fp); fgets(group_ats,10000,fp); fgets(junk,10000,fp); fgets(f_vect,10000,fp); fgets(junk,10000,fp); fclose(fp); while((fgets(select_cond[x],10000,fp))!=NULL) { x++; } printf("Here's what you input: %s\n%s\n%s\n%s\n%s\n",file,select_ats,num_group_var,group_ats,f_vect); fp=fopen("mf_structure.h","w"); fputs("//---------------------------------------------------------------------\n",fp); fputs("//This file contains the mf structure used to hold the data needed for\n",fp); fputs("//the mf query\n",fp); fputs("//---------------------------------------------------------------------\n",fp); fputs("struct MF_STRUCTURE\n",fp); fputs("{\n",fp); while(1) { } fputs("}\n",fp); fclose(fp); return 0; }