| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | C++ Saveding stuff |
LN> @MSGID: 2:224/808 75bba524
LN> @REPLY: 1:163/215.38 56f513e4
LN> @CHARSET: PC-8
>> use:
>> char s[40];
LN> And that 40 should be 41, shouldn't it?
>> fgets (s, 40, stdin);
>> printf ("\n\nThis was the string you entered: %s\n", s);
No, because "fgets" reads "n-1" bytes (so, it reads 39).
According to BC45, anyhow.
--- PointEd 2.0
---------------
* Origin: The Tibbs' Point - Ottawa, Ontario, Canada (1:163/215.38) |
|
| 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™.