suresh
suresh

Reputation: 4224

how to send return(enter button) character through program

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..

Upvotes: 1

Views: 1783

Answers (3)

grigy
grigy

Reputation: 6826

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

Upvotes: 0

elder_george
elder_george

Reputation: 7879

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

Otherwise, use SendInput

Upvotes: 1

Bobby
Bobby

Reputation: 11576

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

Bobby

Upvotes: 0

Related Questions