I would like to know what knowledge I lack about inputs of arrays. I want to input one character and then automatically go to the next line of the code.
Here is the code:
char word[21];
for(int i = 0;i < 21; i++)
{
word[i] = getch();
//cin>>word[i];
if(word[i] == '/')break;
}
for(int j = 0;j < strlen(word); j++ )
{
if(j < (strlen(word) - 1 ))cout<<word[j];
}