I need to create an array with the size that a random number generator creates. Any help would be appreciated!
#include <iostream>
#include <iomanip>
#include <cstdlib>
#include <ctime>
using namespace std;
int main()
{
srand(time(NULL));
int parameter;
char newArray[] = {};
parameter = rand() % 10;
newArray[parameter] = {};
for (int i = 0; i < parameter; i++)
{
cout << "Enter a character: ";
cin >> newArray[i];
}
for (int i = 0; i < parameter; i++)
{
cout << newArray[i];
return (0);
}
}
std::vector