• 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
Objective-C or C++ or something...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Objective-C or C++ or something...


  • Subject: Objective-C or C++ or something...
  • From: Seth Willits <email@hidden>
  • Date: Thu, 7 Aug 2003 12:58:45 -0700

My compiler either just started, or I just noticed, complaining if I declare a variable in the middle of a routine. All of the examples I see and the code I have does this, so obviously it's some kind of setting, but I can't find it anywhere. Could someone tell me how to fix this?

This works:

-(void)blah
{
int helloThere;
NSBeep();
helloThere = 3;
}



This doesn't:

-(void)blah
{
NSBeep();
int helloThere;
helloThere = 3;
}


Thanks,


Seth Willits
------------------------------------------------------------------------ ---
President and Head Developer of Freak Software - http://www.freaksw.com
Q&A Columnist for REALbasic Developer Magazine - http://www.rbdeveloper.com
Webmaster for REALbasic Game Central - http://www.freaksw.com/rbgames

"One day you'll be wandering through the darkness looking for guidance,
inspiration, and your purpose in life, and the next you'll turn around
and realize they've been standing right next to you the whole time."
-- Seth Willits
------------------------------------------------------------------------ ---
_______________________________________________
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: Objective-C or C++ or something...
      • From: "M. Uli Kusterer" <email@hidden>
    • Re: Objective-C or C++ or something...
      • From: Marc Weil <email@hidden>
    • Re: Objective-C or C++ or something...
      • From: Karl Kuehn <email@hidden>
  • Prev by Date: Re: catch key event
  • Next by Date: dragging to a background app's window
  • Previous by thread: Re: beginning Obj-C [LONG]
  • Next by thread: Re: Objective-C or C++ or something...
  • Index(es):
    • Date
    • Thread