i have a problem in my project which converts the equation from infix to postfix ..... the kind of error is runtime error ,,,, and i cant determent the problem ,,,,,
please ,,watch the attached file ,,,, and give me a hint if u can ,,,
thanx ;;;
i have a problem in my project which converts the equation from infix to postfix ..... the kind of error is runtime error ,,,, and i cant determent the problem ,,,,,
please ,,watch the attached file ,,,, and give me a hint if u can ,,,
thanx ;;;
Last edited by backtolife; 10-30-2006 at 12:45 PM.
when does this error happen, ie what function? what is the runtime error message? also just post the code instead of attatching the file, its easier for us
thanx for ur reply ,,,,
but the problem which i faced ,,,,, that the compiler does not determine the error ,,,,
the massage appear (( General protection Exception )) ....
so i dont know exactly the function which causes the error ....
for one your using the wrong headers, get rid of the '.h'. add 'using namespace std;' after the includes and also changed void main to int main try the program again and let us know the result. is there any line numbers that the error occurs at?
after you make these changes paste the updated code in code tags
i use borland C++ ,,, and (( .h)) and (( void main )) is true ,,,,
but the probelm in Function (( InfixToPostfix )) ,,,, i disactived this function and i tested the stack ,,,, i found that the functions of stack work correctly ,,,,
and i tested the funcions of Class (( Expression )) and i found them works correctly too ,,,,
but when i active the function (( InfixToPostfix )) ... i faced an error ,,,,
no, standard C++ requires what i mentioned above.
alsoedit please stop using (()) and ,,,,,,, its just more confusing to understandafter you make these changes paste the updated code in code tags
Seems to me you just asked the strcat to add some string to the NULL pointer... hard to do without exception.Code:postfix=0; ... strcat(postfix,t);
All problems in computer science can be solved by another level of indirection,
except for the problem of too many layers of indirection.
– David J. Wheeler