SyntaxFix
Write A Post
Hire A Developer
Questions
If all you are doing is replacing the existing data, then you can do this
std::vector<int> data; // evil global :) void CopyData(int *newData, size_t count) { data.assign(newData, newData + count); }