error is "left of ".substr" must have class/struct/union type.

Shortened version of my code
Code:
std::string newtext;
std::string * p;

//newtext derived from function

p= &newtext;

while (!isalpha(*p.substr(counter, 1)) & (counter <=maxlen))
{
}
error is on the while line. What is wrong?