i have declared the variable str and defined it as follows..
1 2 3
char str;
std::cout<<"\n Enter name: ";
std::cin>>str;
whenever i enter something like ish kri, i.e., any name with a space in it, it gives me an infinite loop. i tried declaring the variable as a string too, but that didn't help either. PLEASE HELP :)