Welcome! Log In Create A New Profile

Advanced

Ass4 Ques5

Posted by cbrunsdonza 
Announcements Last Post
Announcement SoC Curricula 09/30/2017 01:08PM
Announcement Demarcation or scoping of examinations and assessment 02/13/2017 07:59AM
Announcement School of Computing Short Learning Programmes 11/24/2014 08:37AM
Announcement Unisa contact information 07/28/2011 01:28PM
avatar Ass4 Ques5
August 11, 2009 12:36AM
OK, so I'm stuck on completing Q5 (and I know it was due Friday)...

I've got the sudo code but just cannot get it to work. I'm struggling to pass a pointer to std::queue.push() !!!!!!!!

Has anyone gotten this right, or did you just submit your code in psudo form ...??

--------------------------------------------------------------
Don't Assume Everything is a Nail Just Because You Have a Really Big Hammer
avatar Re: Ass4 Ques5
August 11, 2009 12:39AM
Wait, found the solution .... duh ..... teach me to code at 00:30 !!!!!!!!!!
Released it was something really basic - how I hate coding in PHP during the day and then C++ at night. PHP sends my brain into a dead zone.

FYI:

problem : queue<elemType> q;

solution: queue<nodeType<elemType> *> q;


Output:
BreadtheFirst Traversal
13 6 17 48 33 27 42
Done

--------------------------------------------------------------
Don't Assume Everything is a Nail Just Because You Have a Really Big Hammer
avatar Re: Ass4 Ques5
August 11, 2009 08:27AM
Cool. At least you won't forget it again.

People should never be chastised for making mistakes, it's the best way we learn (hopefully)
Sorry, only registered users may post in this forum.

Click here to login