I made this code here:
#include <functional>
#include <iostream>
#include "to_c_array.h"
void to_c_array(){
}
int main() {
// Please note: this excercise is for educational purposes.
// You should allways use std:: container classes such as std::vector when
// possible.
std::vector<int> v1(10, 1.0);
std::unique_ptr<int[]> p1 = to_c_array(v1);
for (std::size_t i = 0; i < v1.size(); i++)
std::cout << p1[i] << " ";
std::cout << std::endl;
return 0;
}
i want to make a function that will give an output of
Last edited on
Last edited on