On 02/20/05 23:21:16, Peter Bloomfield wrote:
On 02/20/2005 09:28:55 PM, Kacper Wysocki wrote:
[ snip ]
I thought const fields indicated that the field wouldn't be reassinged? Or do you use 'const' here to mean that it's a pointer to a character constant?

I have the hardest time keeping that straight--yes, the latter: const char *service is a pointer to a string that must not be changed; the compiler won't allow assignment to *service (or service[n]). But assignment to service is fine.

But if you use

typedef char *char_p;

then const char_p service declares a variable that you can't assign to! That is, you can initialize it, but never change it. There's some binding here that's hard to figure out... I don't know how you'd declare such a service without the typedef. It's as if the first version is (const char) *service, and the second is const (char *) service--but I believe these parenthesized declarations are not the correct syntax.

Heh, you learn something new every day ;-) now for how to fix the minimum width of the send-msg window...

0K

Attachment: pgplKKu0Oxx77.pgp
Description: PGP signature

_______________________________________________
balsa-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/balsa-list

Reply via email to