On Saturday, 21 March 2015 at 14:31:20 UTC, Dennis Ritchie wrote:
In C++ it is fully working:char s[200005], t[200005]; scanf("%s%s", s, t);
Indeed.
Generate a 100000-character string:
-----
import std.range, std.stdio;
void main () {'a'.repeat (100000).writeln;}
-----
Try to copy it with D scanf and printf:
-----
import std.stdio;
void main () {
char [100000] a;
scanf ("%s", a.ptr);
printf ("%s\n", a.ptr);
}
-----
Only 32767 first characters of the string are actually copied.
