Use vectors instead of variable-length arrays.