• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
static class variable
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

static class variable


  • Subject: static class variable
  • From: Hok Chun So <email@hidden>
  • Date: Thu, 18 Jul 2002 13:57:59 +0800

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.

  • Follow-Ups:
    • Re: static class variable
      • From: Ondra Cada <email@hidden>
    • Re: static class variable
      • From: zauhar <email@hidden>
  • Prev by Date: Re: [Seriously OT]Mac.com 60 days and counting
  • Next by Date: Posting events?
  • Previous by thread: [ANN] Sphaera released
  • Next by thread: Re: static class variable
  • Index(es):
    • Date
    • Thread