• 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
Re: Objective-C++, class scope constants, name conflicts
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Objective-C++, class scope constants, name conflicts


  • Subject: Re: Objective-C++, class scope constants, name conflicts
  • From: Scott Ribe <email@hidden>
  • Date: Thu, 09 Feb 2006 16:38:36 -0700
  • Thread-topic: Objective-C++, class scope constants, name conflicts

> I suppose I could be accused of being retarded for only just now thinking to
> try:
>
> @interface Foo
>     enum { kControlSetCnt = 6 };
> @end
>
> That works.

Aargh!!! It compiles, but the constant does *not* have class scope, thus
having that definition in multiple classes creates name conflicts. Now
*that* is annoying me. If you can declare something inside a class
interface, then it dang well out to have class scope, not global scope!

--
Scott Ribe
email@hidden
http://www.killerbytes.com/
(303) 722-0567 voice


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Re: Calling TransitionWindowWithOptions on a WindowRef returned from a [NSWindow windowRef]
  • Next by Date: Re: Objective-C++, class scope constants, name conflicts
  • Previous by thread: Re: Objective-C++, class scope constants, name conflicts
  • Next by thread: Re: Objective-C++, class scope constants, name conflicts
  • Index(es):
    • Date
    • Thread