OMG IT WORKS NOW, but why?
Type: Posts; User: MercFh
OMG IT WORKS NOW, but why?
ugh this program is driving me up a wall. u said u got it to actually calculate numbers and display the answer correct. but I set type now........and it's not giving errors but it still wont work...
i set it.....but it's still not giving me a number after i put in a equation, altho i get no error. was there anything else u saw wrong with mine?
oh so it would be pwned->type= thatroot->type;?
here is what i have so far, i believe I fixed the set root. im not getting any more errors when i run it, but it still doesnt do the equation
//Matt Smith
//Cs 215 Section 2
//Program 5...
Like I seriously am not sure what type even is, so I should set operand to null.....or?
like i hate to ask can u just show me what u mean?
when u say working, did it actually calculate the numbers?
and when u say copyhelper not setting the type.
cause i fixed the thisroot and setroot
but im not sure what u mean by copyhelper
I changed the set root, and then it pointed to the desthelper....i dunno why?
.......Sorry to be such a pain but can u guys show me what your talking about, im just trying to get this code debugged before it's due tuesday . i mean overall the code looks mostly done correct?...
yeah i changed that, it's still not working tho. I dont know what else to do with this code
but when i do that next is points to
if(( thisroot->left != NULL ) || ( thisroot->right != NULL ))
in the destHelper.
man this program has alot of bugs :(
so something like this?
destHelper (root);
CTNode *temp = NULL;
temp= new CTNode;
temp-> type=type_;
temp-> operand=operand_;
temp->left=NULL;
temp->right=NULL;
root=temp;
delete temp;
So......what? what do that mean what u just said I dont understand lol?
Do i need to delete something or change......im confussled?
So basically my setroot function is f'd up for some reason
no i got the linker errors fixed, that all works, i just called a function wrong
but now when i go to do a number i try (5*3)
it just says program5.exre must now close.
I DID go to the...
Ok i got it all running and everythigns compiled. but when i go to do an expression it gives me a error......and just doesnt do anything. I dunno what the problem is
it just halts for a sec, then...
well doesnt he need to include
using namespace std;
then u can just be like
cout<< "Hello WORLDDDDDDDD" ;
return 0;
?
Ok I changed everything around, everything should be working BUT im getting 3 linker errors, i dunno wtf why though, is there anything else u seen stunningly wrong with it?
//Matt Smith
//Cs...
Ok i've written quite alot
tell me what you think
//Matt Smith
//Cs 215 Section 2
//Program 5
#include "CalcTree.h"
Hello everyone Im new here, and I hope to get to know all of you well
but anyways...on to my problem
Ok Im going to admit this is a HW project, but i've done half of it.
basically
ok.
were...