www.digitalmars.com         C & C++   DMDScript  

D - scanf

reply james jnngill.com writes:
Heres silly question. I'am trying to input a string using scanf. "%s" in D does
not seem to work for char[]. What format string should I be using in D. Or does
D have a better method for console input?

Thanks,

James
Oct 01 2003
parent "Vathix" <vathix dprogramming.com> writes:
<james jnngill.com> wrote in message news:blepb7$1hi4$1 digitaldaemon.com...
 Heres silly question. I'am trying to input a string using scanf. "%s" in D

 not seem to work for char[]. What format string should I be using in D. Or

 D have a better method for console input?

 Thanks,

 James

There's stream.stdin.readLine() or stream.stdin.readString(length)
Oct 01 2003