| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | `new`ing pointers |
DM> This would be a bad thing to do because if you later changed Node's DM> implementation to use a C++ string internally, this code DM> would have to change, defeating the data hiding principles. DM> The best bet, really, is that Node would allocate the space when it DM> is required to, but not any earlier, all automatically. This DM> would allow you to rewrite Node to use other string objects DM> later without changing anyone else's code. Outstanding answer. It seems like it's advice from a Software Engineering professor (CS4510). In fact as long as I'm going to redesign the who thing, I think that I'll use a C++ string throughout. þ CMPQwk 1.42 999 --- Maximus/2 3.01* Origin: COMM Port OS/2 juge.com 204.89.247.1 (281) 980-9671 (1:106/2000) SEEN-BY: 633/267 270 @PATH: 106/2000 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™.