I am trying to write a program that takes unlimited input of names using dynamic memory and stop when the first character is the enter key. i tried, but i am unable to do it.
#include "ReadString"
void main()
{
const int NumNames(20);
char **pNames;
pNames=new char [NumNames++];
for (i=more;i<NumNames;i++)
{
do{
i++;
cout<<i<<")";
pNames[i]=ReadString();
}while(cin.get()='\n';
more=NumNames;
NumNames+=NumNames
}