int fieldLength(int fieldno);

The function fieldLength() returns a length of a field by index.
It returns 0 if index is out of range.


{
    // your code
    for (int i=0; i < dbf->fieldCount(); i++)
        printf( "%d\n", dbf->fieldLength( i ) );
    // your code
}