I know how you define an array and how you put data into them but how do I add data to the end of the array. What I have is this:
Basically if things check out I want to add a number to an array. Is there an easy way of doing it? So I want to start at 0 and continue adding to the array every time I come back to the else statement.Code://declared in main
int newsetArray[10];
int compare(char *c1, char *c2, char *newset)
{
int char1max = strlen(c1);
int char2max = strlen(c2);
for(i=0; i<char1max; i++){
for(j=0; j<char2max; j++){
if(i==j){
for(h=0; h<10; h++){
if(h==j){
}
else{
add j to array in here
}
}
}
}
}
}