Ask your own question, for FREE!
Computer Science 17 Online
OpenStudy (anonymous):

need help in c++ somewhere in main char value; char* ini; sname= new char[20]; cin>>value; sname[i]=value; I need to have a stopping condition when user press enter, how to make it?

OpenStudy (anonymous):

char value; char* sname; sname= new char[20]; for(int i=0;i!=19;i++){ cin>>value; sname[i]=value;}

OpenStudy (anonymous):

this is correct code how to make stopping condition on enter?

OpenStudy (e.mccormick):

Are you trying to get people to enter one character at a time? Here are some notes on cin and cout: http://www.cplusplus.com/doc/tutorial/basic_io/ And here is a guy that goes over some flaws of cin: http://www.cplusplus.com/forum/articles/6046/

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!