Re: static class variable
Re: static class variable
- Subject: Re: static class variable
- From: zauhar <email@hidden>
- Date: Thu, 18 Jul 2002 09:12:05 -0400
- Scubber-version: 1.7 (portal)
Bill, the static declarations need to be outside (before) the
'@interface' declaration. That worked fine for me.
All the best,
Randy
On Thursday, July 18, 2002, at 01:57 AM, Hok Chun So wrote:
Dear all,
Do you know how to declare static class variables? I put the following
lines in the class definition.
@interface SyncFilter : NSObject {
static NSString *str1 = nil;
static NSString *str2 = nil;
}
However, the compiler complains:
SyncFilter.h:13: parse error before `static'
I can create static variable using the above syntax in function. What's
wrong with my declaration?
Thanks for your help.
Bill
======================================================
So Hok Chun, Bill
Computer Engineering Student
The University of Hong Kong
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
Randy J. Zauhar, PhD
Assoc. Prof. of Biochemistry
Director, Graduate Program in Bioinformatics
Dept. of Chemistry & Biochemistry
University of the Sciences in Philadelphia
600 S. 43rd Street
Philadelphia, PA 19104
Phone: (215)596-8691
FAX: (215)596-8543
E-mail: email@hidden
Web:
http://tonga.usip.edu/zauhar
Discussion after watching Disney's "Lilo & Stitch":
DAD: "But why did the space aliens speak English, as opposed to French,
or Swahili? And why did the one alien speak English with an Eastern
European accent? I don't get it."
CATHERINE (age 7): "That's 'cause you don't have a good cartoon brain."
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.