I think you'll wind up with something weird, but what happens if you eliminate (space) as a delimiter? Also, this code looks more like C than C++, you might consider trying over there as well.

You can do a char by char analysis of the string looking char one at a time using (usually somewhat convoluted) logic to determine what is legal to follow any given char, particularly if you want to handle something like "6 - (- 54 - (-61))". That space between the - and 54 is something you and I can handle okay, but it is a bit a futsy business when you try to write code to handle it.

int takeNumber(void)
{
int number = 0;
char digitC = 0;
double digit;
double grade = 0;
bool numberIsNegative = false;
//point is the index (where we are at string)
int tempPoint = point;
//lastPoint string lenght
while( point != (lastPoint + 1) && ( isdigit( digitC = problemString[point] ) || problemString[point] == '-' || problemString[point] == '+' ))
{
//looking the number is negative or positive
if(problemString[point] == '-')
{
numberIsNegative = true;
point ++;
}
else if (problemString[point] == '+')
point++;
skipSpaces();
tempPoint = point;
//looking grade of number example if the number 121 it will be 3
//if it's 1041 it will be four
while( tempPoint != (lastPoint + 1) && isdigit( digitC = problemString[tempPoint] ) )
{
grade++;
tempPoint++;
}
//taking the number from string
while( point != (lastPoint + 1) && isdigit( digitC = problemString[point] ) )
{
digit = atoi(&digitC);
number = number + digit* pow(BASE,grade-1);//BASE = 10
point++;
grade--;
}
if (grade == 0)
break;
}
if(numberIsNegative)
number = -number;
return number;
}

but that had been easy part of my program. it will be a calculator and you can use parenthesises.

it can solve
(-2)+1-((-5)-6+4)*(5-(-6))*(-5-3)-1
result = -618

but it gives the wrong value with that simple question :)
48/12*4

result = 1 :) i didn't think the precedence

it must be 16
i will handle this tomorrow

thx for all replies.

I think you'll wind up with something weird, but what happens if you eliminate (space) as a delimiter? Also, this code looks more like C than C++, you might consider trying over there as well.

i wrote the code in C. . Because I was just trying atof and other functions.
in fact i edited some code

So I am having trouble knowing what to return in the bottom method any help would be appreciated .
Here are the specifications for completing the StringArray class: