| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | Borland Strings |
-> it will be. If you want to use the pointer, you will need to allocate memory -> fo it before you start filling it with information. I like using calloc() -> because it also clears memory, unlike malloc(). -> -> Ex: -> -> char *StrName; -> int size, number; -> number = 1; -> size = 10; -> -> StrName = (char *)calloc (number, size); -> -> This will allocate 10 bytes of memory of type char and pass the starting -> addres to StrName. Everyone seems to suggest something like this, but I fail to see how this is any different in effect from simply declaring char StrName[10] to begin with, which is what I trying NOT to do. I want a VARIABLE length string, which apparently C just doesn't let you do! --- PCBoard (R) v15.21/M 10* Origin: PerryHall BBS 410.529.2006 (1:261/1170) SEEN-BY: 105/42 620/243 711/401 409 410 413 430 807 808 809 934 955 712/407 SEEN-BY: 712/515 628 704 713/888 800/1 7877/2809 @PATH: 261/1170 1087 1023 270/101 105/103 42 712/515 711/808 809 934 |
|
| 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™.