| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | Re: character arrays tha |
Hi William,
You wrote to Dominique Curtis:
WM> DC> my book on C only talks about predefined character strings, ie:
WM> DC> static char *books[30] = {"moby dick",
"annie", etc}; But not on how
WM> DC> to read data into one.
WM>That's an array of pointers to constant strings. You can't read into it.
Not so :-(. There is no "const" in there...
That is an initialised array of strings of varying length that retains
it's value between calls to the function it's declared in. You _can_
write to them, but it's a dangerous occupation since they have the
length of the string they were initialised with and so vary in length.
George
* SLMR 2.1a * Computers eliminate spare time.
--- Maximus/2 3.01
* Origin: DoNoR/2,Woking UK (44-1483-717904) (2:440/4)SEEN-BY: 396/1 632/0 371 633/260 267 270 371 634/397 635/506 728 810 639/252 SEEN-BY: 670/218 @PATH: 440/4 255/1 251/25 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™.