I'm trying to implement a method that tells me how many zones are in the vector I'm using the method strcmp
but I get an error I'm using the library #include <string.h>
is the first time I use it and not I know what to do here I leave my code
void ContarPorZona(string zona){
int cont=0,cont2=0;
for(int k=0;k<n;k++){
if(strcmp (zona,"residencial") == 0){
cont++;
}
if(strcmp (zona,"parque") == 0){
cont2++;
}
}
cout<<"la cantidad de clientes residenciales son: "<<cont<<endl;
cout<<"la cantidad de clientes del parque son: "<<cont2<<endl;
}