debugger question and BST

Which of the following is the correct statement if you want to compile a program but debug it using a debugger such as ddd or gdb?
(a)g++ -g main.cpp
(b) g++ -o main.cpp
(c) g++ -o main.cpp prog
(d) g++ -c main.cpp

don't have any information on my ebook..

and can someone give me link that how Binary Search Tree FLOWS with diagram ?
for preorder ,postorder and inorder
Here is a link to the gcc man page (manual page) if you don't have it already. It is long, but handy to have as reference.

http://linux.die.net/man/1/gcc


In C++ you can use the STL <set> which stores objects in a balanced AVL tree that is ordered by default.

Use <map> to do lookup on a key value, to retrieve an object. This also uses an AVL tree internally.

HTH

The answer is A. I just scrolled through half a zillion options to find it.

There is also -ggdb specifically for gdb.

Also -O1 for level one optimisation.
Last edited on
so for the binary search tree 1. do u have any ebook that can provide the chat or diagram? for those order ? thanks you^^
No I don't - have you tried Google already?
all provided me the code. actually i know how to do for the binary search tree to store node and comparing when addnode . just having problem some logic over there . so i plan to use diagram and draw inside a paper to try out c
Topic archived. No new replies allowed.