I created this function(it works if I put all this into the program) but I can't seem to use the value I get there (the size of a string) in my program... how can I call it and use the values I calculated here
string::size_type ssiz(const vector<string>& sz)
{
typedef vector<string>::size_type st_sz;
st_sz s = sz.size();
st_sz w = sz.size() - 2;
st_sz y = sz.size() - 1;
for(st_sz c = 0; c != s; ++c){
if(sz[y].size() > sz[w].size() || sz[y].size() == sz[w].size()){
w -= 1;
c += 1;
}else{
y = w;
w -=1;
c +=1;
}
}
return sz[y].size();
}