insert a new word into the binary three using + operator overloading The Next CEO of Stack OverflowWhat are the basic rules and idioms for operator overloading?Why doesn't Java offer operator overloading?Overloading operator<< for a templated classreturn value of operator overloading in C++What are the basic rules and idioms for operator overloading?C# operator overload for `+=`?Overloading member access operators ->, .* (C++)Overloading the ++ operator for binary treesOverloading operator + for inserting a node in a BinaryTreeOperator Overloading in Binary TreeOverloading operator++ to find and return successor node of binary search tree

How to count occurrences of text in a file?

How to make a variable always equal to the result of some calculations?

Horror movie/show or scene where a horse creature opens its mouth really wide and devours a man in a stables

Can a caster that cast Polymorph on themselves stop concentrating at any point even if their Int is low?

What's the point of interval inversion?

How can I get through very long and very dry, but also very useful technical documents when learning a new tool?

I believe this to be a fraud - hired, then asked to cash check and send cash as Bitcoin

If I blow insulation everywhere in my attic except the door trap, will heat escape through it?

How easy is it to start Magic from scratch?

How to get regions to plot as graphics

What do "high sea" and "carry" mean in this sentence?

How can I open an app using Terminal?

How to start emacs in "nothing" mode (`fundamental-mode`)

Too much space between section and text in a twocolumn document

Grabbing quick drinks

Why is there a PLL in CPU?

Only print output after finding pattern

Would this house-rule that treats advantage as a +1 to the roll instead (and disadvantage as -1) and allows them to stack be balanced?

How to make a software documentation "officially" citable?

How to write the block matrix in LaTex?

How do spells that require an ability check vs. the caster's spell save DC work?

Why didn't Theresa May consult with Parliament before negotiating a deal with the EU?

Apart from "berlinern", do any other German dialects have a corresponding verb?

Trouble understanding the speech of overseas colleagues



insert a new word into the binary three using + operator overloading



The Next CEO of Stack OverflowWhat are the basic rules and idioms for operator overloading?Why doesn't Java offer operator overloading?Overloading operator<< for a templated classreturn value of operator overloading in C++What are the basic rules and idioms for operator overloading?C# operator overload for `+=`?Overloading member access operators ->, .* (C++)Overloading the ++ operator for binary treesOverloading operator + for inserting a node in a BinaryTreeOperator Overloading in Binary TreeOverloading operator++ to find and return successor node of binary search tree










-2















I am trying to do an operator overloading and I don't have any Idea about how to do an operator overloading for insert a new word into a binary tree.



BinarySearchTree& BinarySearchTree::operator+(string word)

//insert a new word into the binary three
return *this;


// returns a reference to the modified tree










share|improve this question






















  • Does you binary tree have an insert function? If so just call that in the operator. Also, almost everything you could want to know about operator overloading: stackoverflow.com/questions/4421706/…

    – NathanOliver
    Mar 7 at 14:10






  • 2





    Should definitely not be an overload of operator+ - you could use operator +=, but I would use a named function.

    – Neil Butterworth
    Mar 7 at 14:11











  • Do you know how to do operator overloading in a very simple case? Do you know how to insert a word into a binary tree without operator overloading?

    – Beta
    Mar 7 at 14:13











  • So your question is really about inserting into a binary tree? Or is it really about operator overloading?

    – john
    Mar 7 at 14:15











  • "i have no idea" is usually too broad. Any code is better than no code, please show your attempt, it is easier to fix code rather than explaining you how to write an overload from scratch, we dont really know what exactly prevents you from writing the code...

    – user463035818
    Mar 7 at 14:15
















-2















I am trying to do an operator overloading and I don't have any Idea about how to do an operator overloading for insert a new word into a binary tree.



BinarySearchTree& BinarySearchTree::operator+(string word)

//insert a new word into the binary three
return *this;


// returns a reference to the modified tree










share|improve this question






















  • Does you binary tree have an insert function? If so just call that in the operator. Also, almost everything you could want to know about operator overloading: stackoverflow.com/questions/4421706/…

    – NathanOliver
    Mar 7 at 14:10






  • 2





    Should definitely not be an overload of operator+ - you could use operator +=, but I would use a named function.

    – Neil Butterworth
    Mar 7 at 14:11











  • Do you know how to do operator overloading in a very simple case? Do you know how to insert a word into a binary tree without operator overloading?

    – Beta
    Mar 7 at 14:13











  • So your question is really about inserting into a binary tree? Or is it really about operator overloading?

    – john
    Mar 7 at 14:15











  • "i have no idea" is usually too broad. Any code is better than no code, please show your attempt, it is easier to fix code rather than explaining you how to write an overload from scratch, we dont really know what exactly prevents you from writing the code...

    – user463035818
    Mar 7 at 14:15














-2












-2








-2








I am trying to do an operator overloading and I don't have any Idea about how to do an operator overloading for insert a new word into a binary tree.



BinarySearchTree& BinarySearchTree::operator+(string word)

//insert a new word into the binary three
return *this;


// returns a reference to the modified tree










share|improve this question














I am trying to do an operator overloading and I don't have any Idea about how to do an operator overloading for insert a new word into a binary tree.



BinarySearchTree& BinarySearchTree::operator+(string word)

//insert a new word into the binary three
return *this;


// returns a reference to the modified tree







c++ operator-overloading binary-search-tree operator-keyword






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 7 at 14:09









Davide PollcinoDavide Pollcino

22




22












  • Does you binary tree have an insert function? If so just call that in the operator. Also, almost everything you could want to know about operator overloading: stackoverflow.com/questions/4421706/…

    – NathanOliver
    Mar 7 at 14:10






  • 2





    Should definitely not be an overload of operator+ - you could use operator +=, but I would use a named function.

    – Neil Butterworth
    Mar 7 at 14:11











  • Do you know how to do operator overloading in a very simple case? Do you know how to insert a word into a binary tree without operator overloading?

    – Beta
    Mar 7 at 14:13











  • So your question is really about inserting into a binary tree? Or is it really about operator overloading?

    – john
    Mar 7 at 14:15











  • "i have no idea" is usually too broad. Any code is better than no code, please show your attempt, it is easier to fix code rather than explaining you how to write an overload from scratch, we dont really know what exactly prevents you from writing the code...

    – user463035818
    Mar 7 at 14:15


















  • Does you binary tree have an insert function? If so just call that in the operator. Also, almost everything you could want to know about operator overloading: stackoverflow.com/questions/4421706/…

    – NathanOliver
    Mar 7 at 14:10






  • 2





    Should definitely not be an overload of operator+ - you could use operator +=, but I would use a named function.

    – Neil Butterworth
    Mar 7 at 14:11











  • Do you know how to do operator overloading in a very simple case? Do you know how to insert a word into a binary tree without operator overloading?

    – Beta
    Mar 7 at 14:13











  • So your question is really about inserting into a binary tree? Or is it really about operator overloading?

    – john
    Mar 7 at 14:15











  • "i have no idea" is usually too broad. Any code is better than no code, please show your attempt, it is easier to fix code rather than explaining you how to write an overload from scratch, we dont really know what exactly prevents you from writing the code...

    – user463035818
    Mar 7 at 14:15

















Does you binary tree have an insert function? If so just call that in the operator. Also, almost everything you could want to know about operator overloading: stackoverflow.com/questions/4421706/…

– NathanOliver
Mar 7 at 14:10





Does you binary tree have an insert function? If so just call that in the operator. Also, almost everything you could want to know about operator overloading: stackoverflow.com/questions/4421706/…

– NathanOliver
Mar 7 at 14:10




2




2





Should definitely not be an overload of operator+ - you could use operator +=, but I would use a named function.

– Neil Butterworth
Mar 7 at 14:11





Should definitely not be an overload of operator+ - you could use operator +=, but I would use a named function.

– Neil Butterworth
Mar 7 at 14:11













Do you know how to do operator overloading in a very simple case? Do you know how to insert a word into a binary tree without operator overloading?

– Beta
Mar 7 at 14:13





Do you know how to do operator overloading in a very simple case? Do you know how to insert a word into a binary tree without operator overloading?

– Beta
Mar 7 at 14:13













So your question is really about inserting into a binary tree? Or is it really about operator overloading?

– john
Mar 7 at 14:15





So your question is really about inserting into a binary tree? Or is it really about operator overloading?

– john
Mar 7 at 14:15













"i have no idea" is usually too broad. Any code is better than no code, please show your attempt, it is easier to fix code rather than explaining you how to write an overload from scratch, we dont really know what exactly prevents you from writing the code...

– user463035818
Mar 7 at 14:15






"i have no idea" is usually too broad. Any code is better than no code, please show your attempt, it is easier to fix code rather than explaining you how to write an overload from scratch, we dont really know what exactly prevents you from writing the code...

– user463035818
Mar 7 at 14:15













0






active

oldest

votes












Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55045773%2finsert-a-new-word-into-the-binary-three-using-operator-overloading%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55045773%2finsert-a-new-word-into-the-binary-three-using-operator-overloading%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Save data to MySQL database using ExtJS and PHP [closed]2019 Community Moderator ElectionHow can I prevent SQL injection in PHP?Which MySQL data type to use for storing boolean valuesPHP: Delete an element from an arrayHow do I connect to a MySQL Database in Python?Should I use the datetime or timestamp data type in MySQL?How to get a list of MySQL user accountsHow Do You Parse and Process HTML/XML in PHP?Reference — What does this symbol mean in PHP?How does PHP 'foreach' actually work?Why shouldn't I use mysql_* functions in PHP?

Compiling GNU Global with universal-ctags support Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) Data science time! April 2019 and salary with experience The Ask Question Wizard is Live!Tags for Emacs: Relationship between etags, ebrowse, cscope, GNU Global and exuberant ctagsVim and Ctags tips and trickscscope or ctags why choose one over the other?scons and ctagsctags cannot open option file “.ctags”Adding tag scopes in universal-ctagsShould I use Universal-ctags?Universal ctags on WindowsHow do I install GNU Global with universal ctags support using Homebrew?Universal ctags with emacsHow to highlight ctags generated by Universal Ctags in Vim?

Add ONERROR event to image from jsp tldHow to add an image to a JPanel?Saving image from PHP URLHTML img scalingCheck if an image is loaded (no errors) with jQueryHow to force an <img> to take up width, even if the image is not loadedHow do I populate hidden form field with a value set in Spring ControllerStyling Raw elements Generated from JSP tagds with Jquery MobileLimit resizing of images with explicitly set width and height attributeserror TLD use in a jsp fileJsp tld files cannot be resolved