
please wait
|
|
int i, j = 0, k;
. A for loop iterator is best written with the end condition as i < numberCandidates
as opposed to i <= numberCandidates - 1
. As for your question, your names variable seems to be improperly implemented. Assuming you wanted an array of strings, you should either #include string.h
and make it a string array, or if you can't use string, make it char* names[MAX];
. I'm pretty sure you assign a char* with a string literal.
names[howmuchcandidates][maxlettereachname]