enter value for coding
some where in main:
sname= new char;
I need a stopping case when user press enter array get closed and add '\0' at the end but how to do that?
if you want to detect an enter then there are better ways to do that
getline( cin, name );
gets( name );
'\0' are automatically added with these methods
Topic archived. No new replies allowed.