title: gcc error "expected ')' before '[' token"
body: <p>I am receiving these errors while attempting to compile my program with GCC and i'm not sure whats causing them.</p>
  
  <pre><code>functions.h:21: error: expected ')' before '[' token
  functions.h:22: error: expected ')' before '[' token
  functions.h:23: error: expected ')' before '[' token
  functions.h:25: error: expected ')' before '[' token
  functions.h:26: error: expected ')' before '[' token
  functions.h:27: error: expected ')' before '[' token
  </code></pre>
  
  <p>My program compiles fine in visual studio 2012.</p>
  
  <p>Heres the header file that seems to be causing the errors.</p>
  
  <pre><code>struct subject
  {
      char year[5];
      char session;
      char code[8];
      char credit[3];
      char mark[4];
  };
  
  struct data
  {
      char name[30];
      char id[30];
      char cc[30]; 
      char course[80];
      struct subject subjects[30];
      int gpa;
  };
  
  void displayRecord(data [], int);
  int nameSearch(data [], char [], int [], int);
  void editRecord(data [], int, int);
  char getChar(const char [], int);
  int getData(data []);
  void displayData(data []);
  void deleteRecord(data [], int, int);
  </code></pre>
  
  <p>I'm invoking the compiler like this:</p>
  
  <pre>
  gcc -o test functions.cpp functions.h main.cpp
  </pre>
  
  <p>I'm stumped so any help would be appreciated!</p>