I need to make a function (no argument) that will return a char array. The length of the array will be defined by the user. I can not use the gets()
function.
char get()
{
int size;
char *str=new char[size];
int i,l;
cout<<"enter size";
cin>>size;
for(i=0;i<size;i++)
{
str[i]=getche();
}
str[size]='\0';
return str[size];
}