try parsing the expression by spaces putting every token into a string and converting to numerical values when not an operator. Operators have length one and aren't digits (assuming the compound operator like +=, /=, etc aren't allowed) and no space between negative sign and first digit (or decimal point) is allowed if value is less than zero.

If negative numbers not allowed, once you find a char that is a digit build a string of digits stopping at first non digit in the sting and conver the string to numerical value once it's completed.

do you mean something along the lines of scanning each character and pushing it into a string until I encounter a ' ' or an operator? If so, would you mind showing me a quick example?

```
string temp
if(isdigit(expression[i])) //if current char in expression is a digit
temp += expression[i] //addend this digit to temp
++i //go to next char in expression
while(isdigit(expression[i]))//while next char in expressionis a digit
temp += expression[i] //addend it to temp
++i;//go to next char in expression
//end while loop
//end if statement
convert temp to numerical value
push temp on stack
--i; //decrease i by one so when i is incremented by one in the for loop you don't skip over a char in expression.
```

I'm having problems seeing the logic. I rewrote my function and it now looks like this. However, now I am getting a conversion error cannot convert string to float.

```
template <int size>
void Stack<size> :: fillStack()
{
string expression;
string temp;
cout << "Enter a postfix expression and terminate it with a '$': "; //prompt
getline(cin, expression);
int n = expression.length();
for (int i = 0; i < n; i++)
{
if (!isStackFull())
{
if (isdigit(expression[i]))
{
temp += expression[i];
i++;
while(isdigit(expression[i]))
{
temp += expression[i];
i++;
}
float x = (static_cast<float>(temp) - '0');
stack[counter++] = x;
}
else if (ispunct(expression[i]))
{
operate(expression[i]);
}
}
else
{
cout << "Error: Stack is Full" << endl;
exit(0);
}
}
}
```