title: I am doing a simple database management project in C .but when i run this code i get error .
body: <p>i am trying to compare the filename given by user with the array of strings.when i run this code i get error as:<br>
     In function `add_record':<br>
     syntax error before ']' token </p>
  
  <p>also,even if i remove the code from 'start' to 'stop' i get error as:<br>
   i:\gw\lib\crt2.o(.text+0x8)  In function <code>_mingw_CRTStartup':<br>
   [Linker error] undefined reference to</code>__dyn_tls_init_callback'<br>
   [Linker error] undefined reference to `__cpu_features_init'<br>
   i:\gw\lib\crt2.o(.text+0x8) ld returned 1 exit status </p>
  
  <p>Please help me.Thank you!</p>
  
  <pre><code>void add_record()
  {
   FILE *fp;
   char filename[25],fname_check[NO_OF_FILE][25];
   char tester;
   int i;
  
   printf("Type the name of the file you want to store the record in : ");
   scanf("%s",filename);
   //start
   for(i=0;i&lt;sizeof(fname_check);i++)
   {
                                     if(strcmp(fname_check[i][],filename) == 0) printf("File already exists!\n");
                                     break;
                                     }
   printf("The file will be overwritten if you enter the same name.....\n");                                  
  
   printf("Type the name of the file you want to store the record in : ");
   scanf("%s",filename);
     //end                              
  
   fp = fopen(filename,"w");
   if(fp == NULL)
   {
         printf("Sorry,File cannot be opened!");
         getch();
         exit(0);
         }
  
   while(1)
   {
           fflush(stdin);
    printf("\nEnter name : ");
    gets(pro.name);
    printf("Enter age : ");
    scanf("%d",&amp;pro.age);
    printf("Enter gender : ");
    gets(pro.gender); 
    printf("Enter phone : ");
    scanf("%d",&amp;pro.phone); 
    printf("Enter email : ");
    gets(pro.email);
    printf("Enter location : ");
    gets(pro.location);
    printf("Enter bio : ");
    gets(pro.bio);
  
    printf("If you want to add more records press any key... or press ESC key... ");
    tester = getche();
    if(tester == 27) break;
   }
   fclose(fp);
  </code></pre>
  
  <p>}<code>enter code here</code></p>