title: Multiplying matrices: error: expected primary-expression before 'struct'
body: <p>I am trying to write a program that is supposed to multiply matrices using threads.<br>
  I am supposed to fill the matrices using random numbers in a thread. 
  I am compiling in g++ and using PTHREADS. I have also created a struct to pass the data from my command line input to the thread so it can generate the matrix of random numbers. The sizes of the two matrices are also passed in the command line as well.</p>
  
  <p>I keep getting: main.cpp:7: error: expected primary-expression before 'struct'
  my code @ line 7 =:    </p>
  
  <pre><code>struct a{  
       int Arow;    
       int Acol;   
       int low;   
       int high;
   };
  </code></pre>
  
  <p>My inpust are :<br>
  Sizes of two matrices ( 4 arguments)
  high and low ranges in which o generate the random numbers between.</p>
  
  <p>Complete code:</p>
  
  <pre><code>[headers]  
  using namespace std;
  
  void *matrixACreate(struct *);
  
  void *status;
  
  
  int main(int argc, char * argv[])
  { 
  
  
    int Arow = atoi(argv[1]); // Matrix A  
    int Acol = atoi(argv[2]); // WxX  
    int  Brow = atoi(argv[3]); // Matrix B  
    int Bcol = atoi(argv[4]); // XxZ,   
    int low = atoi(argv[5]); // Range low  
    int high = atoi(argv[6]);
  
  struct a{
       int Arow; // Matrix A    
       int Acol; // WxX  
       int low; // Range low  
       int high;
   };
  
  
   pthread_t matrixAthread;
   //pthread_t matrixBthread;
   pthread_t runner;
   int error, retValue;
  
   if (Acol != Brow)
   {
       cout &lt;&lt; " This matrix cannot be multiplied. FAIL" &lt;&lt; endl;
       return 0;
   }
  
   error = pthread_create(&amp;matrixAthread, NULL, matrixACreate, struct *a);  
   //error = pthread_create(&amp;matrixAthread, NULL, matrixBCreate, sendB);  
   retValue = pthread_join(matrixAthread, &amp;status);  
   //retValue = pthread_join(matrixBthread, &amp;status);  
  
   return 0;
  }
  void matrixACreate(struct * a)
  {
      struct a *data = (struct a *) malloc(sizeof(struct a));  
      data-&gt;Arow = Arow;  
      data-&gt;Acol = Acol;  
      data-&gt;low = low;  
      data-&gt;high = high;  
      int range = ((high - low) + 1);  
      cout &lt;&lt; Arow &lt;&lt; endl&lt;&lt; Acol &lt;&lt; endl;  
      }// just trying to print to see if I am in the thread
  </code></pre>