Thread: N00b needs 2nd pair of eyes: error: array type has incomplete element type

  1. #1
    Registered User
    Join Date
    May 2011
    Posts
    2

    Question N00b needs 2nd pair of eyes: error: array type has incomplete element type

    Hello,

    I'm needing a second pair of eyes to look at this.
    What am I doing wrong?

    Code:
    const struct option long_options[] = 
    	{
    		{"help",0,0,'h'},
    		{"output",1,0,'o'},
    		{"debug",1,0,'d'},
    		{"verbose",0,0,'v'},
    		{"environment",0,0,'e'},
    		{NULL,0,NULL,0},			
    	};
    It's an array structure of options for the getopt_long UNIX call.

    Any help would be most appreciated.

  2. #2
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,336
    Make sure you include the header that says what a "struct option" is (i.e., getopt.h).

  3. #3
    Registered User
    Join Date
    May 2011
    Posts
    2
    Thank you sir/madam. You are uber!

    Admins: Solved, thanks.
    Last edited by gn000we; 05-23-2011 at 03:26 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. array type has incomplete element type
    By philgrek in forum C Programming
    Replies: 29
    Last Post: 05-06-2011, 02:42 PM
  2. error: array type has incomplete element type
    By gerger in forum C Programming
    Replies: 8
    Last Post: 10-05-2010, 07:40 AM
  3. derefrencing pointer to incomplete type error
    By aliasghar in forum Linux Programming
    Replies: 3
    Last Post: 09-17-2009, 09:31 AM
  4. Compile Error: Incomplete Type
    By estebbins in forum C Programming
    Replies: 2
    Last Post: 07-07-2008, 10:00 PM
  5. error: field has incomplete type
    By kris.c in forum C Programming
    Replies: 11
    Last Post: 06-12-2007, 03:53 PM

Tags for this Thread