• 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: struct completion
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: struct completion


  • Subject: Re: struct completion
  • From: Greg Pfeil <email@hidden>
  • Date: Thu, 3 Jun 2004 11:42:32 -0700

On 2 Jun 2004, at 13:28, Markian Hlynka wrote:

I've tried:
    struct footype
    {
       int bar;
    }foo;

    foo thevar;
    thevar.

This definitely _shouldn't_ work ... what you're doing here is saying "make me a struct named 'footype', then while you're at it, declare a variable 'foo' of that type." So, when you later try to use 'foo' as a type, it just won't happen.


and also

    typedef struct footype
    {
       int bar;
    }foo;

    foo thevar;
    thevar.b

Hrmm, not quite sure why this isn't showing completions. This should be saying "make me a struct named 'footype', and also a type 'foo' that refers to that struct." This is how I get completion on my structs. Maybe there's something subtly different here that I'm not seeing.


Just for completeness, you mentioned earlier:

	struct foo
	{
		int bar;
	}

	foo thevar;

which I would not expect to work, either. The declaration of 'thevar' would have to look like this, I would think:

	struct foo thevar;

the typedef in the previous examples is used to eliminate the need for 'struct' in all the variable declarations.
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.



  • Follow-Ups:
    • Re: struct completion
      • From: Markian Hlynka <email@hidden>
References: 
 >Re: struct completion (From: Ben <email@hidden>)
 >Re: struct completion (From: Markian Hlynka <email@hidden>)

  • Prev by Date: Re: Can't find Apple Help Indexing Tool
  • Next by Date: Re: struct completion
  • Previous by thread: Re: struct completion
  • Next by thread: Re: struct completion
  • Index(es):
    • Date
    • Thread