Quantcast
Channel: MicroStation Programming Forum - Recent Threads
Viewing all articles
Browse latest Browse all 7260

RE: [V8i C++] Use of std::vector in mdl functions

$
0
0

I would say that reserve is probably not the correct choice here as that is only allocating the memory for the push_back, but it is not setting the count\size of the vector.. I assume that mdlLinear is setting the the values in the array properly but your vector probably remains at a count\size of 0.

try using resize instead of reserve.. std::vector uses a contiguous block of memory, same as an array so I do not see why it would not work.


Viewing all articles
Browse latest Browse all 7260

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>