If you need C-style array binary compatibility, std::vector won't work
: You need to use boost::multi_array or std::valarray (but I believe
valarray API is more difficult to grasp).
To access the raw data of a multi_array, use multi_array::data.
I don't have Boost, and I checked on it: I cannot install/use Boost library
here. The std::valarray doesn't appear to return a C-style array (not
negotiable).
Can't you declare the object either as static-duration, either as
member of a class?
The object? static-duration? I must be dense this morning, cause I'm not
seeing how that gets me from point A (no array) to point B (a 39x200x256
three-dimensional dynamic whcar_t array)?
I'm calling ODBC functions here and they require C-style arrays. Here's a
link to the function I'm trying to work with now:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odbc/htm/odbcsqlbindparameter.asp.
I have no intention of re-writing the SQL Server ODBC drivers to make them
work with std::vector, std::valarray or any other C++ objects or templates.
I'm attempting to use the SQL_PARAMETER_BIND_BY_COLUMN binding type, which
requires two C-style arrays for each parameter: one C-style array for the
values and a second C-style array for the length/indicator. Since I have 39
parameters, I thought it would be useful to set them up as two 39 column
arrays as opposed to 78 separate arrays. Looks like the best option is to
just bite the bullet and set up 78 separate one-dimensional C-style arrays
and be done with it. Then repeat for the other 13 items that I'm trying to
do parameter binding on.
Thanks.