Home > has incomplete > error 1 array type has incomplete element type

Error 1 Array Type Has Incomplete Element Type

Contents

here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies error array type has incomplete element type struct of this site About Us Learn more about Stack Overflow the company

Error Array Type Has Incomplete Element Type In C

Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges array type has incomplete element type extern struct Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a

Array Type Has Incomplete Element Type Struct

minute: Sign up Error: Array type has incomplete element type and binary operand error up vote 0 down vote favorite I am trying to make a multi-program database in C. Here is the code: #include #include #include "function.c" int main() { info(); example(); printf("\n\n\n"); char name[1][10], id[1][10], grade[1][1]; char choice; int x=0; int sal[1]; FILE *fp; printf("Would you like to continue? Y/N: error array type has incomplete element type gcc "); scanf("%c",&choice); fflush(stdin); if(choice == 'Y' || choice == 'y') { system("cls"); fp = fopen("database.txt","w"); if(fp == NULL) { printf("File does not exist!"); return 0; } else { while(x<=1) { printf("Enter Employee name no.%d: ",(x+1)); scanf("%s",name[x]); fprintf(fp, "Employee Name: %s\n",name); printf("Enter Employee ID: "); scanf("%s",id[x]); fprintf(fp, "Employee ID: %s\n",id); printf("Enter Employee Grade Level (A-E): "); scanf("%s",grade[x]); fprintf(fp, "Employee Grade Level: %s\n",grade); printf("Enter Employee's Basic Salary: "); scanf("%d",&sal[x]); fprintf(fp, "Employee's Basic Salary: %d\n\n\n",sal); printf("Employee's bonus: %d\n",bonus(grade[x],sal[x])); printf("Employee's allowance: %d\n",allowance(grade[x], sal[x])); printf("\n"); } } fclose(fp); } else { return 0; } return 0; } function.c : #include #include "function.h" int bonus(char *grade[1][], int *sal[]) { int bonus; int *b; int x; b = &bonus; for(x=0;x<=1;x++) { switch(*grade[x]) { case 'A': bonus = (1/4) * *sal[x]; break; case 'B': bonus = (1/5) * *sal[x]; break; case 'C': bonus = (15/100) * *sal[x]; break; case 'D': bonus = (1/10) * *sal[x]; break; case 'E': bonus = (5/100) * *sal[x]; break; default: printf("Invalid Choice!!"); break; } return bonus; } } int allowance(char *grade[1][], int *sal[]) { int all; int *a; int x; a = &all; for(x=0;x<=1;x++) { switch(*grade[x]) {

here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the

Array Has Incomplete Element Type Char

workings and policies of this site About Us Learn more about

Array Type Has Incomplete Element Type Char

Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions incomplete array Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. http://stackoverflow.com/questions/18292248/error-array-type-has-incomplete-element-type-and-binary-operand-error Join them; it only takes a minute: Sign up C Compile Error: array type has incomplete element type up vote 3 down vote favorite #include typedef struct { int num ; } NUMBER ; int main(void) { struct NUMBER array[99999]; return 0; } I'm getting a compile error: error: array type has incomplete element type I believe the http://stackoverflow.com/questions/21080744/c-compile-error-array-type-has-incomplete-element-type problem is that I'm declaring the array of struct incorrectly. It seems like that's how you declare it when I looked it up. c arrays struct compiler-errors share|improve this question asked Jan 12 '14 at 21:52 JonAthan LAm 24116 add a comment| 2 Answers 2 active oldest votes up vote 9 down vote struct NUMBER array[99999]; should be NUMBER array[99999]; because you already typedefed your struct. EDIT: As OP is claiming that what I suggested him is not working, I compiled this test code and it is working fine: #include typedef struct { int num ; } NUMBER ; int main(void) { NUMBER array[99999]; array[0].num = 10; printf("%d", array[0].num); return 0; } See the running code. share|improve this answer edited Apr 25 at 23:52 Mooseman 14.3k103868 answered Jan 12 '14 at 21:54 haccks 67.9k1788162 2 or struct NUMBER{int num;}; without the typedef –SHR Jan 12 '14 at 21:56 1 @SHR Yes. It is. –haccks Jan 12 '14 at 21:57 NUMBER array[99999]; gives me more errors. One of them states: NUMB

communities company blog Stack Exchange Inbox Reputation and Badges sign up log in tour help Tour Start here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site http://askubuntu.com/questions/572404/error-running-make-array-type-has-incomplete-element-type About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Ask Ubuntu Questions Tags Users Badges Unanswered Ask Question _ Ask Ubuntu is http://cboard.cprogramming.com/c-programming/137733-array-type-has-incomplete-element-type.html a question and answer site for Ubuntu users and developers. Join them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best has incomplete answers are voted up and rise to the top Error running make - array type has incomplete element type up vote 0 down vote favorite I am trying to install libbow library. When i run make file the following error is generated gcc -c -Ibow -I. -I./argp -DHAVE_LIBNSL=1 -DHAVE_STRERROR=1 -DHAVE_GETTIMEOFDAY=1 -DHAVE_RANDOM=1 -DHAVE_SRANDOM=1 -DHAVE_SETENV=1 -DHAVE_STRCHR=1 -DHAVE_STRRCHR=1 -DHAVE_ALLOCA_H=1 -g -O -Wall -Wimplicit -o array.o array.c In file included from has incomplete element array.c:22: ./bow/libbow.h:2128: error: array type has incomplete element type make: *** [array.o] Error 1 The Source of libbow is :http://www.cs.cmu.edu/~mccallum/bow/src/ (The latest version) Search results showed it as a compiler problem. How to resolve this? Or is there any other source for libbow? gcc make makefile share|improve this question asked Jan 11 '15 at 7:58 DDR 1013 Which version of gcc are you using? –ztik Jan 15 '15 at 9:38 add a comment| 1 Answer 1 active oldest votes up vote 0 down vote The error points line 2128 of bow/libbow.h extern struct argp_child bow_argp_children[]; It means that struct argp_child is not defined. I noticed that in line 1346 there is a forward declaration of the structure. struct argp_child; /* forward declare this type */ The full declaration of the structure is in line 245 of argp/argp.h To resolve this issue you can either Use include of argp.h in libbow.h i.e #include "../argp/argp.h" Copy struct argp_child definition in libbow.h (not recommended) An other thought is that you might compiling array.c from wrong directory and -Ibow -I. -I./argp does not point to the correct directories. share|improve this answer answered Jan 15 '15 at 9:56 ztik 28618 add

Programming Boards C Programming array type has incomplete element type Getting started with C or C++ | C Tutorial | C++ Tutorial | C and C++ FAQ | Get a compiler | Fixes for common problems Thread: array type has incomplete element type Thread Tools Show Printable Version Email this Page… Subscribe to this Thread… Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode 05-06-2011 #1 philgrek View Profile View Forum Posts Registered User Join Date Feb 2011 Posts 42 array type has incomplete element type Im down to a deadline and need to solve the problems with this code. When compiling its giving me the errors: [12:22:05][peg002@lnxAcadShell01][/home/peg002/LAB4]+ make cc -c -o lib/SelectionSort.o lib/SelectionSort.c lib/SelectionSort.c:6: error: array type has incomplete element type lib/SelectionSort.c:6: warning: âstruct employeeâ declared inside parameter list lib/SelectionSort.c:6: warning: its scope is only this definition or declaration, which is probably not what you want lib/SelectionSort.c: In function âSelectionSortâ: lib/SelectionSort.c:9: error: array type has incomplete element type make: *** [lib/SelectionSort.o] Error 1 Code: #include #include #include #define MaxSize 30 void SelectionSort(struct employee eTable[MaxSize], int numEntries, FILE *outFile){ struct employee temp[1]; int maxPt; int j, k; for(j = (numEntries -1); j > 0; j--){ maxPt = 0; for(k = 1; k <= j; k++) if(strcmp(eTable[k].dept, eTable[maxPt].dept) > 0) maxPt = k; temp = eTable[maxPt]; eTable[maxPt] = eTable[j]; eTable[j] = temp; } fprintf(outFile, "\n\n********************SORTED DATA FROM ''D'' OPTION SORT**************************\n\n\n"); for(k=0; k < numEntries; k++){ fprintf(outFile, "%-10s\t%-12s\t%-20s\t%-4.2f\t%-10s\n", eTable[k].surname, eTable[k].given, eTable[k].dept, eTable[k].payRate, eTable[k].eyeColor); } } I'm clueless as to how to fix this. I don't know if its necessary to be able to help, but here is my main program.. Code: #include #include #include #define MaxSize 30 //Define struct// struct employee { char surname[10]; char given[12]; char dept[20]; float payRate; char eyeColor[8]; }; void (*SelectionSort_d)(); void (*SelectionSort2_d)(

 

Related content

array type has incomplete element type error c

Array Type Has Incomplete Element Type Error C table id toc tbody tr td div id toctitle Contents div ul li a href Error Array Type Has Incomplete Element Type Struct a li li a href Type Of Formal Parameter Is Incomplete C a li li a href Array Has Incomplete Element Type int C a li ul td tr tbody table p here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and relatedl policies of this site About Us Learn more about Stack array has incomplete

array type has incomplete element type error

Array Type Has Incomplete Element Type Error table id toc tbody tr td div id toctitle Contents div ul li a href Error Array Type Has Incomplete Element Type Gcc a li li a href Error Label At End Of Compound Statement a li li a href Error Array Type Has Incomplete Element Type Mud a li ul td tr tbody table p here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us relatedl Learn more about Stack Overflow the company

c error parameter has incomplete type

C Error Parameter Has Incomplete Type table id toc tbody tr td div id toctitle Contents div ul li a href Error Aggregate Has Incomplete Type And Cannot Be Defined a li li a href Variable Has Incomplete Type Struct a li li a href How To Pass Structure To A Function In C a li ul td tr tbody table p here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About relatedl Us Learn more about Stack Overflow the company Business

c programming error array type has incomplete element type

C Programming Error Array Type Has Incomplete Element Type table id toc tbody tr td div id toctitle Contents div ul li a href Array Type Has Incomplete Element Type Extern Struct a li li a href Type Of Formal Parameter Is Incomplete C a li li a href Array Has Incomplete Element Type int C a li ul td tr tbody table p here for a quick overview of the site Help Center Detailed answers to any questions you might have relatedl Meta Discuss the workings and policies of this site About error array type has incomplete element type

compile error has incomplete type

Compile Error Has Incomplete Type table id toc tbody tr td div id toctitle Contents div ul li a href Error Field Has Incomplete Type a li li a href Error Field Has Incomplete Type Struct a li li a href Error Aggregate Has Incomplete Type a li ul td tr tbody table p here for a quick overview of the relatedl site Help Center Detailed answers to any questions c error has incomplete type you might have Meta Discuss the workings and policies of p h id Error Field Has Incomplete Type p this site About Us Learn more

error array has incomplete element type

Error Array Has Incomplete Element Type table id toc tbody tr td div id toctitle Contents div ul li a href Error Array Type Has Incomplete Element Type Gcc a li li a href Error Label At End Of Compound Statement a li li a href Error Expected Specifier Qualifier List Before a li ul td tr tbody table p here for relatedl a quick overview of the site Help array has incomplete element type char Center Detailed answers to any questions you might have Meta error array type has incomplete element type in c Discuss the workings and policies

error array type has incomplete element type struct

Error Array Type Has Incomplete Element Type Struct table id toc tbody tr td div id toctitle Contents div ul li a href Array Type Has Incomplete Element Type C a li li a href Array Has Incomplete Element Type char a li li a href Incomplete Array a li ul td tr tbody table p here for a quick overview of the site Help Center Detailed answers to any questions relatedl you might have Meta Discuss the workings and policies array type has incomplete element type extern struct of this site About Us Learn more about Stack Overflow the

error array type has incomplete element type gcc

Error Array Type Has Incomplete Element Type Gcc table id toc tbody tr td div id toctitle Contents div ul li a href Error Array Type Has Incomplete Element Type In C a li li a href Array Has Incomplete Element Type char a li li a href Type Of Formal Parameter Is Incomplete C a li li a href Array Has Incomplete Element Type int C a li ul td tr tbody table p here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and relatedl policies

error array type has incomplete element type c

Error Array Type Has Incomplete Element Type C table id toc tbody tr td div id toctitle Contents div ul li a href Array Has Incomplete Element Type char a li li a href Array Type Has Incomplete Element Type Char a li li a href Array Has Incomplete Element Type char C a li ul td tr tbody table p here for a quick overview of the site Help Center Detailed answers to any relatedl questions you might have Meta Discuss the workings and error array type has incomplete element type struct policies of this site About Us Learn

error array type has incomplete element type

Error Array Type Has Incomplete Element Type table id toc tbody tr td div id toctitle Contents div ul li a href Error Array Type Has Incomplete Element Type In C a li li a href Error Label At End Of Compound Statement a li li a href Array Type Has Incomplete Element Type Extern Struct a li ul td tr tbody table p here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings relatedl and policies of this site About Us Learn more about Stack error array

error field has incomplete type enum

Error Field Has Incomplete Type Enum table id toc tbody tr td div id toctitle Contents div ul li a href C Error Field Has Incomplete Type a li li a href Error Field St atim Has Incomplete Type a li li a href Error Field Info Has Incomplete Type a li ul td tr tbody table p here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site relatedl About Us Learn more about Stack Overflow the company Business Learn error field has

error field has incomplete type qt

Error Field Has Incomplete Type Qt table id toc tbody tr td div id toctitle Contents div ul li a href Error Field St atim Has Incomplete Type a li li a href Error Field Info Has Incomplete Type a li li a href Field Has Incomplete Type Class a li ul td tr tbody table p here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta relatedl Discuss the workings and policies of this site About Us error field has incomplete type struct Learn more about Stack Overflow the company

error field has incomplete type string

Error Field Has Incomplete Type String table id toc tbody tr td div id toctitle Contents div ul li a href Error Field Has Incomplete Type Struct a li li a href Error Field Info Has Incomplete Type a li li a href Field Has Incomplete Type Array a li li a href Field Has Incomplete Type Template a li ul td tr tbody table p Sign in Pricing Blog Support Search GitHub option form This repository Watch Star Fork Valloric YouCompleteMe Code Issues Pull requests Projects relatedl Wiki Pulse Graphs New issue variable has incomplete p h id Error

error field has incomplete type class

Error Field Has Incomplete Type Class table id toc tbody tr td div id toctitle Contents div ul li a href Error Field St atim Has Incomplete Type a li li a href Field Has Incomplete Type Template a li li a href Field Has Incomplete Type Struct C a li ul td tr tbody table p here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss relatedl the workings and policies of this site About Us Learn error field has incomplete type struct more about Stack Overflow the company

error field has incomplete type gcc

Error Field Has Incomplete Type Gcc table id toc tbody tr td div id toctitle Contents div ul li a href Error Dereferencing Pointer To Incomplete Type Gcc a li li a href Error Field Has Incomplete Type Struct a li li a href C Error Field Has Incomplete Type a li ul td tr tbody table p here for a relatedl quick overview of the site Help Center error array type has incomplete element type gcc Detailed answers to any questions you might have Meta Discuss p h id Error Dereferencing Pointer To Incomplete Type Gcc p the workings

error field has incomplete type c

Error Field Has Incomplete Type C table id toc tbody tr td div id toctitle Contents div ul li a href Error Field St atim Has Incomplete Type a li li a href Field Has Incomplete Type Template a li li a href Field Has Incomplete Type Struct Sockaddr a li ul td tr tbody table p here for a quick overview of the relatedl site Help Center Detailed answers to any questions error field has incomplete type struct you might have Meta Discuss the workings and policies of this p h id Error Field St atim Has Incomplete Type

error has incomplete type

Error Has Incomplete Type table id toc tbody tr td div id toctitle Contents div ul li a href Error Field Has Incomplete Type Struct a li li a href Error Aggregate Has Incomplete Type And Cannot Be Defined a li li a href Stringstream Has Incomplete Type a li ul td tr tbody table p here for a quick overview of the site Help Center Detailed answers to any questions you relatedl might have Meta Discuss the workings and policies of error has incomplete type c this site About Us Learn more about Stack Overflow the company Business p

kernel error array type has incomplete element type

Kernel Error Array Type Has Incomplete Element Type table id toc tbody tr td div id toctitle Contents div ul li a href Error Array Type Has Incomplete Element Type Struct a li li a href Array Type Has Incomplete Element Type Char a li li a href Array Type Has Incomplete Element Type Int a li ul td tr tbody table p here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this relatedl site About Us Learn more about Stack Overflow the company