Iam getting error while compiling the following code.... I know the mistake i have done is a silly one, but could not find it after repeated parsing.. Please help;

Code:`short CAppWnd::ProcessData(short *pbuff, unsigned int nParseCount)`

{

unsigned short naaLeadBuffer[12][nParseCount];

unsigned int nBuffCount = nParseCount / 500;

unsigned int nPos = 0;

for(unsigned int nLeadCount = 0; nLeadCount < 12; nLeadCount++)

{

for(unsigned int nCount = 0; nCount <= nBuffCount; nCount

+= 500)

{

for(unsigned int nSampleCount = 0; nSampleCount < 500; nSampleCount

+= 10)

{

naaLeadBuffer[nLeadCount][nPos++] = (*pbuff[nLeadCount][nSampleCount

+ 2] + *pbuff[nLeadCount][nSampleCount + 3]) / 2;

naaLeadBuffer[nLeadCount][nPos++]

= *pbuff[nLeadCount][nSampleCount + 5];

naaLeadBuffer[nLeadCount][nPos++] = (*pbuff[nLeadCount][nSampleCount

+ 7] + *pbuff[nLeadCount][nSampleCount + 8]) / 2;

naaLeadBuffer[nLeadCount][nPos++] = *pbuff[nLeadCount][nSampleCount

+ 10];

}

}

}

return nParsecount;

}

error log ==>

./AppWnd.cpp: In member function 'short int CAppWnd::ProcessData(short int*, unsigned int)':

../AppWnd.cpp:491:14: error: invalid types 'short int[unsigned int]' for array subscript

../AppWnd.cpp:491:53: error: invalid types 'short int[unsigned int]' for array subscript

../AppWnd.cpp:493:48: error: invalid types 'short int[unsigned int]' for array subscript

../AppWnd.cpp:495:14: error: invalid types 'short int[unsigned int]' for array subscript

../AppWnd.cpp:495:53: error: invalid types 'short int[unsigned int]' for array subscript

../AppWnd.cpp:497:15: error: invalid types 'short int[unsigned int]' for array subscript

mingw32-make: *** [AppWnd.o] Error 1