error is "left of ".substr" must have class/struct/union type.
Shortened version of my code
error is on the while line. What is wrong?Code:std::string newtext;
std::string * p;
//newtext derived from function
p= &newtext;
while (!isalpha(*p.substr(counter, 1)) & (counter <=maxlen))
{
}