Like Tree1Likes
  • 1 Post By tabstop

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

This is a discussion on N00b needs 2nd pair of eyes: error: array type has incomplete element type within the C Programming forums, part of the General Programming Boards category; Hello, I'm needing a second pair of eyes to look at this. What am I doing wrong? Code: const struct ...

  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,185
    Make sure you include the header that says what a "struct option" is (i.e., getopt.h).
    gn000we likes this.

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

Tags for this Thread


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21