SyntaxFix
Write A Post
Hire A Developer
Questions
In C++11, you can return std::array.
std::array
#include <array> using namespace std; array<int, 5> fillarr(int arr[]) { array<int, 5> arr2; for(int i=0; i<5; ++i) { arr2[i]=arr[i]*2; } return arr2; }