TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: CAMERON CLARK
from: NICKOLAS HIRGIJ
date: 1997-08-29 09:01:00
subject: stream bug???

ddt.demos.su!f400.n5020!f121.n461!uanet.cit-ua.net!uanet.kharkov.ua!useua!f121
.n461!f133.n461!f108.n461!not-for-mail
Hello Cameron!
Mon Aug 25 1997 06:50, Cameron Clark wrote to All:
 CC>     ofstream outf("out.bin");
 CC>     char string[6];
 CC>     strcpy(string,"12345");
 CC>     string[strlen(string)] = '\n';
 CC>     outf.write(string, strlen(string));
 CC>     outf.close();
 CC>     The side effect is that it writes the following:
 CC>     12345#13#10           (where #13 & #10 are ascii characters)
That isn't side effect.
It is normal conversion ("\x10" -> "\x13\x10") for output in _TEXT_ mode,
and #13#10 -> #10 for input.
In otherwise, "\x10" inside = "\x13\x10" outside.
Regards,
        Nickolas
--- Золотой Редактор, по прозвищу Голый Дед 3.00.Alpha4+
---------------
* Origin: Как чайник чайнику... А может кофейник - кофейнику. (2:461/108.5)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.