cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
Binary Search Tree
Binary Search Tree
Aug 18, 2015 at 2:53pm UTC
AVM8
(56)
My question is, can we use class to implement binary search tree? Because in most of the website, i have found that most of them using struct. I just need to know the proper way to do binary search tree using class. Thank you. Much appreciated.
Aug 18, 2015 at 2:58pm UTC
AbstractionAnon
(6954)
The only difference between
struct
and
class
is the default visibility of members.
Anything you can do in a struct, you can do in a class.
So, yes, you can use a class to implement a BST.
Aug 18, 2015 at 3:05pm UTC
AVM8
(56)
AbstractionAnon
Thank you very much. Much appreciated.
Topic archived. No new replies allowed.