Ah, strcmp(). There are so many functions I still don't know.
I've made this function, which should return a true or false for comparison:
Code:
int stringcheck(char string1_to_check_for,char string2_to_check_for,char* array_to_check[],int length_of_array,){
int result=0;
while (result == 0){
if( strcmp(string1_to_check_for,array_to_check[i])==0 | strcmp(string2_to_check_for,array_to_check[i])==0 ){
result = 1;
}else{
result=0;
i++;
}
}
return result;
}
Am I getting this right?
And another question:
Is it necessary in every compiler, in order to test a little c file, to first create a project, add the c file, add linkers, and then finally compile it??
It's a little pain in the ass if I just want to test for instance this function, without using it in my program right away.