D&C Lug - Home Page
Devon & Cornwall Linux Users' Group

[ Date Index ][ Thread Index ]
[ <= Previous by date / thread ] [ Next by date / thread => ]

Re: Character arrays was Re: [LUG] C - global arrays



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Friday 02 August 2002 9:08 am, Steve Marvell wrote:
Incrementing booktry doesn't seem very const.

it's a pointer so it can be operatied on numerically without affecting the 
contents, whch is all a pointer doesn't allow - you can stuill do pointer 
arithmatic on it.


your best bet is probaly to use and array of pointers either like this:

while (booktry[i]) {

 .. do something with i ..

 i++;
}

or some reincarnation (for, do, etc..) of that.


~ Theo

- -- 

Theo Zourzouvillys
http://zozo.org.uk/

Nothing so needs reforming as other people's habits.
               -- Mark Twain, "Pudd'nhead Wilson's Calendar"
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE9SkMw448CrwpTn6YRAhyJAKDMsNfnld4QZijPFnrqXjdrwhH3KgCgnrvP
rtLJXYhZj60+rx4Av1J8kAM=
=O0bz
-----END PGP SIGNATURE-----


--
The Mailing List for the Devon & Cornwall LUG
Mail majordomo@xxxxxxxxxxxx with "unsubscribe list" in the
message body to unsubscribe.


Lynx friendly