tags:

views:

74

answers:

3

how to send return(enter button) character through program in windows c/c++? I want to send an external program "user name" with enter button through pipe but "\n" and "\r" and EOF are not working..

A: 

You mean something like this: CodeProject: C++ SendKeys ?

Bobby

Bobby
+1  A: 

If this is conole application, write "\r\n" to its STDIN.

Otherwise, use SendInput

elder_george
\r\n is not working
suresh
A: 

It's not clear what do you need, maybe this: "\r\n"?

grigy