How to refactor the C++ code to support the dynamic array size
<p>I need to get rid of fixed array size in  C++/ODBC   apps.
Instead the hardcoded array size (ROWS =10 below) I want to pass the ROWS as the command-line argument. I know how to parse the command line.
But how to adjust the following code?</p>

<pre>
    #define ROWS 10

    SQLINTEGER idata[ROWS]
    SQLCHAR cdata1[ROWS][256]
    SQLFLOAT fdata[ROWS]
    SQL_TIMESTAMP_STRUCT ts[ROWS]

    SQLSetStmtAttr(SQL_ATTR_ROW_ARRAY_SIZE, ROWS)

    SQLBindCol(1, &idata)
    SQLBindCol(2, cdata1)
    SQLBindCol(3, fdata)
    SQLBindCol(4, &ts)
    SQLExecDirect("query producing a result-set")
</pre>

<p>Update: I cannot modify the signature of SQLBindCol(..) </p>

<p>Let say I will create std::vector instead of SQLFLOAT fdata[ROWS] but how to pass it into SQLBindCol() which does not expect std::vector? </p>
