Take the 2-minute tour ×  I want to pass in an array of
parameters to SQLBindParameters, and have this array held in a
char array(since I don't know the type beforehand) (I want all
the elements in the 'array' to be the same).  I'll have a
pointer to a sample parameter type, and the size of the
parameter.  void *buffer = getBuffer(); int bufferLength =
getBufferLength(); const int numElements = 200; //for example
char *array = new char[bufferLength * numElements];
memcpy(array + (i * bufferLength), buffer, bufferLength)  // now
use array in SQLBindParameter call      will this work as
expected, without any alignment issues? (i.e., the same as if I
had just declared an array of the right type to start with)
share|improve this question Are you asking the same thing as Are
std::vector elements guaranteed to be contiguous?? –  Troubadour
Jun 17 '11 at 17:38 actually, I shouldn't even have mentioned
the vector, my question is more if it would work, even if
vectorBuffer was declared as char *VectorBuffer = n