TIP: Click on subject to list as thread! ANSI
echo: c_echo
to: Tom Torfs
from: Kurt Kuzba
date: 1998-09-14 23:43:02
subject: C++ strings and arrays

TT> KD>   strncpy() is safer, it is like strcpy() except it
TT> KD>   takes another agrument limiting the maximum number
TT> KD>   of characters to copy.
TT>   But don't forget to mention that the resulting "string"
TT>   may end up non 0-terminated.
   That's why I like using sprintf() with specifiers. If you are
   using printf() or sprintf() for other things, then you
   already have the code overhead accounted for anyway.
   It may be a bit slower, but that's not too major a
   consideration with most applications, since string formatting
   isn't usually too large a portion of the code, nor the most
   frequently called, and if it occurs in conjunction with any
   keyboard routines, the user will definitely be the slowest
   link in the chain. 

> ] Give me only the facts. I grow weary of all these Truths....

---
* Origin: *YOPS ]I[* 8.4 GIG * RA/FD/FE * Milwaukee, WI (1:154/750)
SEEN-BY: 396/1 622/419 632/0 371 633/260 267 270 371 634/397 635/506 728 810
SEEN-BY: 639/252 670/218
@PATH: 154/750 222 396/1 633/260 635/506 728 633/267

SOURCE: echomail via fidonet.ozzmosis.com

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™.