Write an overloaded function that displays a character or a one-dimensional array. Provide an explanation for the output.
Demonstrate the function for all data options.
This is what I have.
What is the problem then?
#include <iostream> #include <ctime> #include <cstdlib> #include <conio.h> using namespace std; int show(int n) { srand(time(0)); int* m = new int[n]; for (int i=0; i<n; i++) { m[i] = rand()%10; cout << m[i] << " "; } cout << endl; return 0; } int main() { int n; cout << " Input size of the matrix: " << n << endl; cout << show(n) << endl; _getch(); } Help me please.