Click here to Skip to main content
15,899,475 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: urgent help on randomising 10 digits and write it back in 4 digits in 4 rows... Pin
Rilhas1-May-06 1:30
Rilhas1-May-06 1:30 
QuestionDisplaying/converting a RAW image instead of a BMP image Pin
Tito-K4L30-Apr-06 4:11
Tito-K4L30-Apr-06 4:11 
AnswerRe: Displaying/converting a RAW image instead of a BMP image Pin
Justin Tay30-Apr-06 4:26
Justin Tay30-Apr-06 4:26 
GeneralRe: Displaying/converting a RAW image instead of a BMP image Pin
Tito-K4L30-Apr-06 4:35
Tito-K4L30-Apr-06 4:35 
GeneralRe: Displaying/converting a RAW image instead of a BMP image Pin
Justin Tay30-Apr-06 5:10
Justin Tay30-Apr-06 5:10 
GeneralRe: Displaying/converting a RAW image instead of a BMP image Pin
Christian Graus30-Apr-06 11:39
protectorChristian Graus30-Apr-06 11:39 
AnswerRe: Displaying/converting a RAW image instead of a BMP image Pin
Saurabh.Garg30-Apr-06 14:06
Saurabh.Garg30-Apr-06 14:06 
QuestionBinary Tree Help Pin
Blah Blah Blah 2930-Apr-06 3:59
Blah Blah Blah 2930-Apr-06 3:59 
I have a question regarding Binary Trees. I have to read an input file, then traverse the tree, and then print out the results of the traversal. I can understand what has to be done, but when it comes to translating it into C++ language, I get stuck. Confused | :confused:

It is a genealogy tree, with advisors and advisees assigned to them. I have to construct the tree for a sequence of name pairs, and traverse the tree to output the list of the names and the levels as I visit each node in the tree. The advisor name in the first pair of names in the text file is the given list for the root node name.

A sample input

alonzo.church hartely.rogers
alonzo.church samuel.kleene
alonzo.church manuel.blum
hartley.rogers pat.fischer
samuel.kleene rob.constable
samuel.kleene paul.axt
pat.fischer dennis.ritchie

should produce this output

alonzo.church 1
hartley.rogers 2
samuel.kleene 2
manuel.blum 2
pat.fischer 3
rob.constable 3
paul.axt 3
dennis.ritchie 4

The text file is on my computer: "TestInput.txt".

Any help is welcomed, and appreciated.

Thank you for you information.

D.

-- modified at 10:01 Sunday 30th April, 2006
AnswerRe: Binary Tree Help Pin
Maxwell Chen30-Apr-06 5:14
Maxwell Chen30-Apr-06 5:14 
GeneralRe: Binary Tree Help Pin
Blah Blah Blah 2930-Apr-06 7:59
Blah Blah Blah 2930-Apr-06 7:59 
GeneralRe: Binary Tree Help Pin
Maxwell Chen30-Apr-06 8:08
Maxwell Chen30-Apr-06 8:08 
GeneralRe: Binary Tree Help Pin
David Crow1-May-06 6:20
David Crow1-May-06 6:20 
AnswerRe: Binary Tree Help Pin
Stephen Hewitt30-Apr-06 13:52
Stephen Hewitt30-Apr-06 13:52 
GeneralRe: Binary Tree Help Pin
Maxwell Chen30-Apr-06 18:09
Maxwell Chen30-Apr-06 18:09 
GeneralRe: Binary Tree Help Pin
Stephen Hewitt30-Apr-06 18:12
Stephen Hewitt30-Apr-06 18:12 
GeneralRe: Binary Tree Help Pin
Maxwell Chen30-Apr-06 18:17
Maxwell Chen30-Apr-06 18:17 
QuestionA couple of problems - cin.get - (Beginner) Pin
haitch7930-Apr-06 3:56
haitch7930-Apr-06 3:56 
AnswerRe: A couple of problems - cin.get - (Beginner) Pin
Justin Tay30-Apr-06 7:33
Justin Tay30-Apr-06 7:33 
AnswerRe: A couple of problems - cin.get - (Beginner) Pin
Aqueel30-Apr-06 7:39
Aqueel30-Apr-06 7:39 
GeneralRe: A couple of problems - cin.get - (Beginner) Pin
haitch7930-Apr-06 9:41
haitch7930-Apr-06 9:41 
GeneralRe: A couple of problems - cin.get - (Beginner) Pin
Maxwell Chen30-Apr-06 18:15
Maxwell Chen30-Apr-06 18:15 
GeneralRe: A couple of problems - cin.get - (Beginner) Pin
haitch7930-Apr-06 23:52
haitch7930-Apr-06 23:52 
GeneralRe: A couple of problems - cin.get - (Beginner) Pin
Maxwell Chen1-May-06 0:33
Maxwell Chen1-May-06 0:33 
Question---how to lock two mutexes simultaneously in atomic mode? Pin
dragooooon lee30-Apr-06 3:26
dragooooon lee30-Apr-06 3:26 
AnswerRe: ---how to lock two mutexes simultaneously in atomic mode? Pin
Ryan Binns30-Apr-06 18:32
Ryan Binns30-Apr-06 18:32 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.