Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> how to copy sql_context safely
Hello
I use C++'s std::vector<sql_context>-like array in my C program. In the array, I'd like to manage "sql_context"s. What I said vector-like means that sql_context in this array may be copied to another place in the future if the number of elements exceed the capacity of array; for example,
std::vector<sql_context> v;
v.push_back(sql_context1); v.push_back(sql_context2); v.push_back(sql_context3); ... v.push_back(sql_context_n);
if I continue to push_back(), std::vector<> will reallocate new enough array and free old array. Assuming that sql_context doesn't have constructor or destructor, std::vector<> will copy every sql_context as it is. I don't know if this simple copy does harm. If it is not safe, how can I safely implement vector? Received on Mon May 10 2004 - 23:37:42 CDT
![]() |
![]() |