Function to retun char array via pointers : Hi im new here and sorry foe the haste but looking for help ASAP. 
Need to make a function (no argument ) that will return a char array . 
the length of the array will be defined by the user . 
can not use 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];
}