stdarg, checking for # of entered arguments
Code:
void CMatrix::SetRow(unsigned short iRowNum, ...)
{
if (m_pdMatrixData == NULL) return;
// Error Checking;
va_list vaList;
// Variable length argument lists... defined in stdarg.h;
va_start(vaList, iRowNum);
for (int i = 0; i < m_iDimension[0]; i++)
{
m_pdMatrixData[iRowNum][i] = va_arg(vaList, double);
}
}
How would I go about checking that the number of arguments entered is less than m_iDimension[0]? I searched on MSDN, and I tried something like sizeof(vaList)/sizeof(double) < m_iDimension[0] but that didn't seem to work.
Any help would be much appreciated.