S
stanlo
Hello to all, i have a progam fragment here for the follow up of my
project ; mathematicl expression. i don t want to use pointers, this is
the fragment.my problem is there an alternative way of declaring and
defining my functions without using pointers,eg in the goToOp1
function, i don t wish to write "char*line".
this function gets the first operator in the mathematical expression
like 1+6*6/2.
//function declarations
int goToOp1(char* line, int startPos, int &curExprBegin);
int goToOp2(char* line, int startPos, int &curExprEnd);
void reduceArr(char* line, int curExprBegin, int curExprEnd, long
number);
void discardBadChar(char* line, bool &exit);
void errorOutput(const char* erroralert);
//function definitons, i did just the definition of one of the
functions
int goToOp1(char* line, int startPos, int &curExprBegin)
{
int pos=startPos-2;
int op1Size=0;
int answer;
answer = 0;
project ; mathematicl expression. i don t want to use pointers, this is
the fragment.my problem is there an alternative way of declaring and
defining my functions without using pointers,eg in the goToOp1
function, i don t wish to write "char*line".
this function gets the first operator in the mathematical expression
like 1+6*6/2.
//function declarations
int goToOp1(char* line, int startPos, int &curExprBegin);
int goToOp2(char* line, int startPos, int &curExprEnd);
void reduceArr(char* line, int curExprBegin, int curExprEnd, long
number);
void discardBadChar(char* line, bool &exit);
void errorOutput(const char* erroralert);
//function definitons, i did just the definition of one of the
functions
int goToOp1(char* line, int startPos, int &curExprBegin)
{
int pos=startPos-2;
int op1Size=0;
int answer;
answer = 0;