Arrays - why no Resize or Redim method?


Am i missing something or does there appear not to be any method that can resize an arrray - similar to redim in VB? .

I realise we have setallocatedsize() but this isnt quite the same.


You don’t need to resize them - they expand/contract when you add/remove things…


but sometimes I need to specifically resize ( downsize) an array to a specific size since i use size() in code to determine how to process certain arrays.

( to explain more fully, i am using JUCE to implement a C++ wrapper for
code originally written in REALbasic ( and then exported into C++ ) which has keywords such as redim() )


So just use removeRange()…


or use std::vector…