Array of Pointers To Strings C++
I am trying to check string's length in order to check if they have the same number of vowels. But i have to pass an array of pointers to string as parameter. Here is the full code. #include <iostream> #include <string> #include <cstring> using namespace std; bool method(string *A[][5]){ for(int k=0;k<5;k++){ int count=0; int count2=0; for(int i=0;i<5;i++){ for(int j=i+1;j<5;j++){ //SPOSTAMENTO TRA LE STRINGHE for(int g=0;g< strlen(*A[i][k]);g++){ if(A[i][k][g]=='a'||'e'||'i'||'o'||'u'){ count++; } for(int f=0;f<*A[j][k].length();f++){ if(A[j][k][f]=='a'||'e'||'i'||'o'||'u'){ count2++; } } } if(count==count2 && count!=0){cout<<A[i][k]<<A[j][k]<<"this strings are sisters";return true;} } count=0; count2=0; } } }