• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

anyone know c++ well

JOHNGALT99

Senior member
Tittle says it all.

I need some c++ help ASAP and willing to pay if someone is interested.

Must know data structures well
 
Haha... sounds like help on homework... 😉

Probably doesn't pay well enough to interest me. 😛


... how much does it pay? 🙂
 
I am having trouble writing a program that uses binary search trees,

It pretty basic stuff but this is my first c++ class

Rate is negotiable, but I would be looking for someone to work with me through out writing the program
 
what part about BST's are you having problems with? just the structure itself and how they actually work, like the concept? or do you know the concept and don't know how to put it in code?

or is it both?
 
Just create a "node" object which has 2 pointers to child nodes. In your main program, have a headNode which is the root of the tree. To traverse it, set the currentNode to the head node. Check the value of the currentNode against the value you're searching for. If it's higher, set the rightChildNode as currentNode. If it's lower, set the leftChildNode as currentNode. Continue this until you find the item you're looking for, or reach a node with no child nodes.
 
Originally posted by: JOHNGALT99
I am having trouble writing a program that uses binary search trees,

It pretty basic stuff but this is my first c++ class

Rate is negotiable, but I would be looking for someone to work with me through out writing the program

No offense, but if you can't hack BSTs in your first CS class on your own, I'd switch majors. Getting tutoring is fine, but you should be able to get help from your class mates or a professor.

This reeks of "I'll pay someone anonymous to do my homework for me."
 
ok , but what if I need to store mulitple items in a node, like first name last name of the person, plus there parents name ect. I am not sure how to do that.

I have a unquie number for each person to use as the key.
 
a information security and assurance degree

working on a third degree. doing ok in the class but this part as gotten me lost.

I under stand the concept and can write a simple binary search tree, but storing multiple items in a node has me lost
 
Originally posted by: JOHNGALT99
ok , but what if I need to store mulitple items in a node, like first name last name of the person, plus there parents name ect. I am not sure how to do that.

I have a unquie number for each person to use as the key.
You have learned about classes/structures, no?

class Node
{
private:
int key;
string firstName;
string lastName;
string parentName;
public:
int getkey();
string getFirstName();
string getLastName();
string getParentName();
}


Put whatever you want in the data section, along with the key.
 
Originally posted by: JOHNGALT99
ok , but what if I need to store mulitple items in a node, like first name last name of the person, plus there parents name ect. I am not sure how to do that.

I have a unquie number for each person to use as the key.

That's easy to do. The node object you create will have all of those as public attributes.

It's been a while since I've written code in C++, but it should look something like this:

class Node
{

public String firstName;
public String lastName;
public String parentName;
public Node *leftChildNode;
public Node *rightChildNode;

public int ID;

public Node(String firstName, String lastName, String parentName, int ID)
{
this.firstName == firstName;
this.lastName == lastName;
this.parentName == parentName;
this.ID == ID;
leftChildNode == null;
rightChildNode == null;
}

}
 
ok now it is making a little more sense.

I did write my node as a class, but didnt realize i could store multiple items in the node.

Thanks
 
How much are we talking here? if it is a school project, then do your own homework. if legit and good $$, I can pick up another contract in about 3 weeks.
 
yea dude all the info you need is already given to you in this thread. they told you how to create a node and how to traverse the the tree as well. and from the traversing algorithm, that also shows you where/how to place the new nodes entered in the BST.
 
thanks all for the help.

My brain just needed a swift kick.

might be back with more questions later.

FYI my background is in

International Relations BS
Minor in Physics
MA International Relations

Working my ass off to get a MS in information security and assurance now

I am in the washington dc area, if anyone else is out here as well feel free to say hello

thanks again
 
Originally posted by: JOHNGALT99
I am having trouble writing a program that uses binary search trees,

It pretty basic stuff but this is my first c++ class

Rate is negotiable, but I would be looking for someone to work with me through out writing the program

Do your own homework dude.:|
 
Originally posted by: DaShen
Originally posted by: JOHNGALT99
I am having trouble writing a program that uses binary search trees,

It pretty basic stuff but this is my first c++ class

Rate is negotiable, but I would be looking for someone to work with me through out writing the program

Do your own homework dude.:|

He admitted that he had a problem, explained the issue and an explanation was provided. He acknolwdged it with gratitude
ok now it is making a little more sense.

I did write my node as a class, but didnt realize i could store multiple items in the node.

Thanks
Looking a few posts up rather than jumping all over him based on the original post was uncallled for.

 
Back
Top