| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | stream bug??? |
The following pseudo-code has an unfortunate side effect:
(using Borland c++ 4.51)
ofstream outf("out.bin");
char string[6];
strcpy(string,"12345");
string[strlen(string)] = '\n';
outf.write(string, strlen(string));
outf.close();
The side effect is that it writes the following:
12345#13#10 (where #13 & #10 are ascii characters)
What the hell am I doing wrong?
--- GEcho 1.00
---------------
* Origin: Digital OnLine Magazine! - (409)838-8237 (1:3811/350) |
|
| 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™.