I wrote a simple program that accepts name ,age from user.
i declared name as char and age as int.Somehow when it prompts the statement to ask the value from user something is happening.Meaning if i enter jacob as name it immediately displays the next statement as enter ur age and the coming out of the program.
can anyone psl tell why is this happening ?
cout<<"enter ur name"<<endl;
cout<<"enter ur age"<<endl;
somhow it is not taking long name as input to name field.Pls suggest some solution.