Transaction History

I got the transaction implet/specification that suppose to receive transaction history and print it out. I know its missing the other classes but I got those workings I just want to know if anyone see anything that is wrong with the first and second code because for some reason it won't set the TransType to "TransInfo". Also the history is place into a dynamic memory allocation.

sets the history information

codes removed.
Last edited on
You haven't provided the code for setTransaction()
sorry about that

Last edited on
Can you provide the declaration for transptr and where you're allocating the memory for it.
I didnt want to post all of my code incase my prof do a search and think i copied it, but i "assuming"(bad choice of word) that i can delete the post/thread and it won't be seen?

Can you see if im doing the destructor correct as well not too sure on that.

Last edited on
It looks like it should be working. I'd put in some cout statements to debug and see where it's going wrong. Without your entire solution it's very hard to just read and spot bugs, your one isn't that obvious from what I ca see.

And yes, you can delete your code from the post later.
Ok thanks for the input. I'll try to look at it again with couts to make sure the indexs are correct. Hopefully i can figure it out myself if not ill come back with the whole program.

One last thing, the destructor looks fine correct? and should i set transptr=0 or its good as it is without it.

            delete [] transptr;
Last edited on
Doesn't matter because it's in the destructor.
Topic archived. No new replies allowed.