Hi,
I have called cin.Ignore(), please refer the below,
#include <iostream>
#include <conio.h>
using namespace std;
int main()
{
char name[15];
int namecount;
cout<<"How many letters in your name (including the space)?: "<<endl;
cin>>namecount;
cout<<"Enter your name: "<<endl;
cin.ignore(); cin.getline(name, 15,'\n');
cout<<"Your name is:"<<endl;
for(int i=0; i<namecount;i++)>
{
cout<<name[i];
}
getch();
return 0;
}</conio.h></iostream>
Best Regards
Muthuraja