Documentation for 8b1eab204b

This commit is contained in:
realstealthninja
2024-11-04 12:43:05 +00:00
parent 4fb6e622e9
commit a7bccf7d01
6732 changed files with 153919 additions and 365711 deletions

View File

@@ -1,3 +1,4 @@
<!-- HTML header for doxygen 1.12.0-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
@@ -5,10 +6,15 @@
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.12.0"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Algorithms_in_C++: others/tower_of_hanoi.cpp File Reference</title>
<title>TheAlgorithms/C++: others/tower_of_hanoi.cpp File Reference</title>
<link rel="icon" href="../../favicon.svg" type="image/x-icon" />
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../jquery.js"></script>
<script type="text/javascript" src="../../dynsections.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/@xpack-3rd-party/doxygen-awesome-css@2.2.0-1/doxygen-awesome-darkmode-toggle.js"></script>
<script type="text/javascript">
DoxygenAwesomeDarkModeToggle.init()
</script>
<script type="text/javascript" src="../../clipboard.js"></script>
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../navtreedata.js"></script>
@@ -18,14 +24,24 @@
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../search/searchdata.js"></script>
<script type="text/javascript" src="../../search/search.js"></script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js", "TeX/AMSmath.js", "TeX/AMSsymbols.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
<script type="text/javascript">
window.MathJax = {
options: {
ignoreHtmlClass: 'tex2jax_ignore',
processHtmlClass: 'tex2jax_process'
},
loader: {
load: ['[tex]/ams']
},
tex: {
macros: {},
packages: ['base','configmacros','ams']
}
};
</script>
<script type="text/javascript" async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/MathJax.js?config=TeX-MML-AM_CHTML/MathJax.js"></script>
<script type="text/javascript" id="MathJax-script" async="async" src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js"></script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
<link href="../../doxygen-awesome.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
@@ -33,10 +49,11 @@ MathJax.Hub.Config({
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectlogo"><img alt="Logo" src="../../project_logo.png"/></td>
<td id="projectalign">
<div id="projectname">Algorithms_in_C++<span id="projectnumber">&#160;1.0.0</span>
<div id="projectname">TheAlgorithms/C++<span id="projectnumber">&#160;1.0.0</span>
</div>
<div id="projectbrief">Set of algorithms implemented in C++.</div>
<div id="projectbrief">All the algorithms implemented in C++</div>
</td>
</tr>
</tbody>
@@ -119,7 +136,9 @@ Include dependency graph for tower_of_hanoi.cpp:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="../../d9/ddb/tower__of__hanoi_8cpp__incl.svg" width="186" height="111"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
</div>
</div><table class="memberdecls">
</div>
<p><a href="../../db/d3c/tower__of__hanoi_8cpp_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="nested-classes" name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d2c/structtower.html">tower</a></td></tr>
@@ -138,6 +157,8 @@ Functions</h2></td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Solve the <a href="https://en.wikipedia.org/wiki/Tower_of_Hanoi" target="_blank">Tower of Hanoi</a> problem. </p>
<p class="definition">Definition in file <a class="el" href="../../db/d3c/tower__of__hanoi_8cpp_source.html">tower_of_hanoi.cpp</a>.</p>
</div><h2 class="groupheader">Function Documentation</h2>
<a id="ae66f6b31b5ad750f1fe042a706a4e3d4" name="ae66f6b31b5ad750f1fe042a706a4e3d4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae66f6b31b5ad750f1fe042a706a4e3d4">&#9670;&#160;</a></span>main()</h2>
@@ -154,6 +175,8 @@ Functions</h2></td></tr>
</table>
</div><div class="memdoc">
<p>Main function </p>
<p class="definition">Definition at line <a class="el" href="../../db/d3c/tower__of__hanoi_8cpp_source.html#l00065">65</a> of file <a class="el" href="../../db/d3c/tower__of__hanoi_8cpp_source.html">tower_of_hanoi.cpp</a>.</p>
<div class="fragment"><div class="line"><span class="lineno"> 65</span> {</div>
<div class="line"><span class="lineno"> 66</span> <span class="keyword">struct </span><a class="code hl_struct" href="../../d2/d2c/structtower.html">tower</a> F, U, T;</div>
<div class="line"><span class="lineno"> 67</span> </div>
@@ -163,8 +186,8 @@ Functions</h2></td></tr>
<div class="line"><span class="lineno"> 71</span> </div>
<div class="line"><span class="lineno"> 72</span> <span class="keywordtype">int</span> no;</div>
<div class="line"><span class="lineno"> 73</span> </div>
<div class="line"><span class="lineno"> 74</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;\nEnter number of discs : &quot;</span>;</div>
<div class="line"><span class="lineno"> 75</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_istream.html">std::cin</a> &gt;&gt; no;</div>
<div class="line"><span class="lineno"> 74</span> std::cout &lt;&lt; <span class="stringliteral">&quot;\nEnter number of discs : &quot;</span>;</div>
<div class="line"><span class="lineno"> 75</span> std::cin &gt;&gt; no;</div>
<div class="line"><span class="lineno"> 76</span> </div>
<div class="line"><span class="lineno"> 77</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = no; i &gt; 0; i--) {</div>
<div class="line"><span class="lineno"> 78</span> F.values[F.top++] = i;</div>
@@ -175,17 +198,10 @@ Functions</h2></td></tr>
<div class="line"><span class="lineno"> 83</span> </div>
<div class="line"><span class="lineno"> 84</span> <span class="keywordflow">return</span> 0;</div>
<div class="line"><span class="lineno"> 85</span>}</div>
<div class="ttc" id="abasic_istream_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/io/basic_istream.html">std::cin</a></div></div>
<div class="ttc" id="abasic_ostream_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a></div></div>
<div class="ttc" id="astructtower_html"><div class="ttname"><a href="../../d2/d2c/structtower.html">tower</a></div><div class="ttdef"><b>Definition</b> tower_of_hanoi.cpp:11</div></div>
<div class="ttc" id="astructtower_html_acb535964abd34c47678a4ade0628223d"><div class="ttname"><a href="../../d2/d2c/structtower.html#acb535964abd34c47678a4ade0628223d">tower::top</a></div><div class="ttdeci">int top</div><div class="ttdoc">top tower ID</div><div class="ttdef"><b>Definition</b> tower_of_hanoi.cpp:15</div></div>
<div class="ttc" id="atower__of__hanoi_8cpp_html_ab037f72a5eac476535a6cfbbcb965417"><div class="ttname"><a href="#ab037f72a5eac476535a6cfbbcb965417">TH</a></div><div class="ttdeci">void TH(int n, tower *From, tower *Using, tower *To)</div><div class="ttdef"><b>Definition</b> tower_of_hanoi.cpp:52</div></div>
</div><!-- fragment --><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="../../db/d3c/tower__of__hanoi_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.svg" width="242" height="60"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
</div>
<div class="ttc" id="astructtower_html"><div class="ttname"><a href="../../d2/d2c/structtower.html">tower</a></div><div class="ttdef"><b>Definition</b> <a href="../../db/d3c/tower__of__hanoi_8cpp_source.html#l00011">tower_of_hanoi.cpp:11</a></div></div>
<div class="ttc" id="astructtower_html_acb535964abd34c47678a4ade0628223d"><div class="ttname"><a href="../../d2/d2c/structtower.html#acb535964abd34c47678a4ade0628223d">tower::top</a></div><div class="ttdeci">int top</div><div class="ttdoc">top tower ID</div><div class="ttdef"><b>Definition</b> <a href="../../db/d3c/tower__of__hanoi_8cpp_source.html#l00015">tower_of_hanoi.cpp:15</a></div></div>
<div class="ttc" id="atower__of__hanoi_8cpp_html_ab037f72a5eac476535a6cfbbcb965417"><div class="ttname"><a href="#ab037f72a5eac476535a6cfbbcb965417">TH</a></div><div class="ttdeci">void TH(int n, tower *From, tower *Using, tower *To)</div><div class="ttdef"><b>Definition</b> <a href="../../db/d3c/tower__of__hanoi_8cpp_source.html#l00052">tower_of_hanoi.cpp:52</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a id="af4cfc41e546f1f8d25f01e0804e8b61d" name="af4cfc41e546f1f8d25f01e0804e8b61d"></a>
@@ -213,12 +229,14 @@ Here is the call graph for this function:</div>
</table>
</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="../../db/d3c/tower__of__hanoi_8cpp_source.html#l00039">39</a> of file <a class="el" href="../../db/d3c/tower__of__hanoi_8cpp_source.html">tower_of_hanoi.cpp</a>.</p>
<div class="fragment"><div class="line"><span class="lineno"> 39</span> {</div>
<div class="line"><span class="lineno"> 40</span> --From-&gt;<a class="code hl_variable" href="../../d2/d2c/structtower.html#acb535964abd34c47678a4ade0628223d">top</a>;</div>
<div class="line"><span class="lineno"> 41</span> To-&gt;<a class="code hl_variable" href="../../d2/d2c/structtower.html#a3ebb75c13c57d51a8a1ba1ea54a515e9">values</a>[To-&gt;<a class="code hl_variable" href="../../d2/d2c/structtower.html#acb535964abd34c47678a4ade0628223d">top</a>] = From-&gt;<a class="code hl_variable" href="../../d2/d2c/structtower.html#a3ebb75c13c57d51a8a1ba1ea54a515e9">values</a>[From-&gt;<a class="code hl_variable" href="../../d2/d2c/structtower.html#acb535964abd34c47678a4ade0628223d">top</a>];</div>
<div class="line"><span class="lineno"> 42</span> ++To-&gt;<a class="code hl_variable" href="../../d2/d2c/structtower.html#acb535964abd34c47678a4ade0628223d">top</a>;</div>
<div class="line"><span class="lineno"> 43</span>}</div>
<div class="ttc" id="astructtower_html_a3ebb75c13c57d51a8a1ba1ea54a515e9"><div class="ttname"><a href="../../d2/d2c/structtower.html#a3ebb75c13c57d51a8a1ba1ea54a515e9">tower::values</a></div><div class="ttdeci">int values[10]</div><div class="ttdoc">Values in the tower.</div><div class="ttdef"><b>Definition</b> tower_of_hanoi.cpp:13</div></div>
<div class="ttc" id="astructtower_html_a3ebb75c13c57d51a8a1ba1ea54a515e9"><div class="ttname"><a href="../../d2/d2c/structtower.html#a3ebb75c13c57d51a8a1ba1ea54a515e9">tower::values</a></div><div class="ttdeci">int values[10]</div><div class="ttdoc">Values in the tower.</div><div class="ttdef"><b>Definition</b> <a href="../../db/d3c/tower__of__hanoi_8cpp_source.html#l00013">tower_of_hanoi.cpp:13</a></div></div>
</div><!-- fragment -->
</div>
</div>
@@ -246,18 +264,20 @@ Here is the call graph for this function:</div>
</table>
</div><div class="memdoc">
<p>Display the towers </p>
<p class="definition">Definition at line <a class="el" href="../../db/d3c/tower__of__hanoi_8cpp_source.html#l00019">19</a> of file <a class="el" href="../../db/d3c/tower__of__hanoi_8cpp_source.html">tower_of_hanoi.cpp</a>.</p>
<div class="fragment"><div class="line"><span class="lineno"> 20</span> {</div>
<div class="line"><span class="lineno"> 21</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;\n\n\tF : &quot;</span>;</div>
<div class="line"><span class="lineno"> 21</span> std::cout &lt;&lt; <span class="stringliteral">&quot;\n\n\tF : &quot;</span>;</div>
<div class="line"><span class="lineno"> 22</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; F-&gt;<a class="code hl_variable" href="../../d2/d2c/structtower.html#acb535964abd34c47678a4ade0628223d">top</a>; i++) {</div>
<div class="line"><span class="lineno"> 23</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; F-&gt;<a class="code hl_variable" href="../../d2/d2c/structtower.html#a3ebb75c13c57d51a8a1ba1ea54a515e9">values</a>[i] &lt;&lt; <span class="stringliteral">&quot;\t&quot;</span>;</div>
<div class="line"><span class="lineno"> 23</span> std::cout &lt;&lt; F-&gt;<a class="code hl_variable" href="../../d2/d2c/structtower.html#a3ebb75c13c57d51a8a1ba1ea54a515e9">values</a>[i] &lt;&lt; <span class="stringliteral">&quot;\t&quot;</span>;</div>
<div class="line"><span class="lineno"> 24</span> }</div>
<div class="line"><span class="lineno"> 25</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;\n\tU : &quot;</span>;</div>
<div class="line"><span class="lineno"> 25</span> std::cout &lt;&lt; <span class="stringliteral">&quot;\n\tU : &quot;</span>;</div>
<div class="line"><span class="lineno"> 26</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; U-&gt;<a class="code hl_variable" href="../../d2/d2c/structtower.html#acb535964abd34c47678a4ade0628223d">top</a>; i++) {</div>
<div class="line"><span class="lineno"> 27</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; U-&gt;<a class="code hl_variable" href="../../d2/d2c/structtower.html#a3ebb75c13c57d51a8a1ba1ea54a515e9">values</a>[i] &lt;&lt; <span class="stringliteral">&quot;\t&quot;</span>;</div>
<div class="line"><span class="lineno"> 27</span> std::cout &lt;&lt; U-&gt;<a class="code hl_variable" href="../../d2/d2c/structtower.html#a3ebb75c13c57d51a8a1ba1ea54a515e9">values</a>[i] &lt;&lt; <span class="stringliteral">&quot;\t&quot;</span>;</div>
<div class="line"><span class="lineno"> 28</span> }</div>
<div class="line"><span class="lineno"> 29</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;\n\tT : &quot;</span>;</div>
<div class="line"><span class="lineno"> 29</span> std::cout &lt;&lt; <span class="stringliteral">&quot;\n\tT : &quot;</span>;</div>
<div class="line"><span class="lineno"> 30</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; T-&gt;<a class="code hl_variable" href="../../d2/d2c/structtower.html#acb535964abd34c47678a4ade0628223d">top</a>; i++) {</div>
<div class="line"><span class="lineno"> 31</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; T-&gt;<a class="code hl_variable" href="../../d2/d2c/structtower.html#a3ebb75c13c57d51a8a1ba1ea54a515e9">values</a>[i] &lt;&lt; <span class="stringliteral">&quot;\t&quot;</span>;</div>
<div class="line"><span class="lineno"> 31</span> std::cout &lt;&lt; T-&gt;<a class="code hl_variable" href="../../d2/d2c/structtower.html#a3ebb75c13c57d51a8a1ba1ea54a515e9">values</a>[i] &lt;&lt; <span class="stringliteral">&quot;\t&quot;</span>;</div>
<div class="line"><span class="lineno"> 32</span> }</div>
<div class="line"><span class="lineno"> 33</span>}</div>
</div><!-- fragment -->
@@ -300,6 +320,8 @@ Here is the call graph for this function:</div>
</table>
</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="../../db/d3c/tower__of__hanoi_8cpp_source.html#l00052">52</a> of file <a class="el" href="../../db/d3c/tower__of__hanoi_8cpp_source.html">tower_of_hanoi.cpp</a>.</p>
<div class="fragment"><div class="line"><span class="lineno"> 52</span> {</div>
<div class="line"><span class="lineno"> 53</span> <span class="keywordflow">if</span> (n == 1) {</div>
<div class="line"><span class="lineno"> 54</span> <a class="code hl_function" href="#af4cfc41e546f1f8d25f01e0804e8b61d">mov</a>(From, To);</div>
@@ -311,13 +333,8 @@ Here is the call graph for this function:</div>
<div class="line"><span class="lineno"> 60</span> <a class="code hl_function" href="#ab037f72a5eac476535a6cfbbcb965417">TH</a>(n - 1, Using, From, To);</div>
<div class="line"><span class="lineno"> 61</span> }</div>
<div class="line"><span class="lineno"> 62</span>}</div>
<div class="ttc" id="atower__of__hanoi_8cpp_html_af4cfc41e546f1f8d25f01e0804e8b61d"><div class="ttname"><a href="#af4cfc41e546f1f8d25f01e0804e8b61d">mov</a></div><div class="ttdeci">void mov(tower *From, tower *To)</div><div class="ttdef"><b>Definition</b> tower_of_hanoi.cpp:39</div></div>
</div><!-- fragment --><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="../../db/d3c/tower__of__hanoi_8cpp_ab037f72a5eac476535a6cfbbcb965417_cgraph.svg" width="144" height="60"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
</div>
<div class="ttc" id="atower__of__hanoi_8cpp_html_af4cfc41e546f1f8d25f01e0804e8b61d"><div class="ttname"><a href="#af4cfc41e546f1f8d25f01e0804e8b61d">mov</a></div><div class="ttdeci">void mov(tower *From, tower *To)</div><div class="ttdef"><b>Definition</b> <a href="../../db/d3c/tower__of__hanoi_8cpp_source.html#l00039">tower_of_hanoi.cpp:39</a></div></div>
</div><!-- fragment -->
</div>
</div>
</div><!-- contents -->

View File

@@ -1,6 +0,0 @@
<map id="TH" name="TH">
<area shape="rect" id="Node000001" title=" " alt="" coords="5,29,45,55"/>
<area shape="poly" id="edge2_Node000001_Node000001" title=" " alt="" coords="8,30,5,21,7,12,14,5,25,3,37,6,43,12,39,16,34,10,25,8,16,10,12,14,11,20,13,28"/>
<area shape="rect" id="Node000002" href="$db/d3c/tower__of__hanoi_8cpp.html#af4cfc41e546f1f8d25f01e0804e8b61d" title=" " alt="" coords="93,29,139,55"/>
<area shape="poly" id="edge1_Node000001_Node000002" title=" " alt="" coords="45,40,77,40,77,45,45,45"/>
</map>

View File

@@ -1 +0,0 @@
e1d2841de77893c347fd45e19112d7cd

View File

@@ -1,74 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 12.1.2 (20240928.0832)
-->
<!-- Title: TH Pages: 1 -->
<svg width="108pt" height="45pt"
viewBox="0.00 0.00 108.25 45.25" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<svg id="main" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve">
<style type="text/css"><![CDATA[
.node, .edge {opacity: 0.7;}
.node.selected, .edge.selected {opacity: 1;}
.edge:hover path { stroke: red; }
.edge:hover polygon { stroke: red; fill: red; }
]]></style>
<script type="application/ecmascript" xlink:href="../../svg.min.js"/>
<svg id="graph" class="graph">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 41.25)">
<title>TH</title>
<!-- Node1 -->
<g id="Node000001" class="node">
<title>Node1</title>
<g id="a_Node000001"><a xlink:title=" ">
<polygon fill="#999999" stroke="#666666" points="29.5,-19.25 0,-19.25 0,0 29.5,0 29.5,-19.25"/>
<text text-anchor="middle" x="14.75" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">TH</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node1 -->
<g id="edge2_Node000001_Node000001" class="edge">
<title>Node1&#45;&gt;Node1</title>
<g id="a_edge2_Node000001_Node000001"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M4.08,-19.54C-0.78,-28.15 2.77,-37.25 14.75,-37.25 21.3,-37.25 25.33,-34.53 26.84,-30.65"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="30.35,-30.51 25.61,-21.04 23.41,-31.4 30.35,-30.51"/>
</a>
</g>
</g>
<!-- Node2 -->
<g id="Node000002" class="node">
<title>Node2</title>
<g id="a_Node000002"><a xlink:href="../../db/d3c/tower__of__hanoi_8cpp.html#af4cfc41e546f1f8d25f01e0804e8b61d" target="_top" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="100.25,-19.25 65.5,-19.25 65.5,0 100.25,0 100.25,-19.25"/>
<text text-anchor="middle" x="82.88" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">mov</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node2 -->
<g id="edge1_Node000001_Node000002" class="edge">
<title>Node1&#45;&gt;Node2</title>
<g id="a_edge1_Node000001_Node000002"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M29.77,-9.62C36.78,-9.62 45.52,-9.62 53.83,-9.62"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="53.55,-13.13 63.55,-9.63 53.55,-6.13 53.55,-13.13"/>
</a>
</g>
</g>
</g>
</svg>
</svg>
<style type='text/css'>
<![CDATA[
[data-mouse-over-selected='false'] { opacity: 0.7; }
[data-mouse-over-selected='true'] { opacity: 1.0; }
]]>
</style>
<script type="application/ecmascript"><![CDATA[
document.addEventListener('DOMContentLoaded', (event) => {
highlightEdges();
highlightAdjacentNodes();
});
]]></script>
</svg>

Before

Width:  |  Height:  |  Size: 2.8 KiB

View File

@@ -1,48 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 12.1.2 (20240928.0832)
-->
<!-- Title: TH Pages: 1 -->
<svg width="108pt" height="45pt"
viewBox="0.00 0.00 108.25 45.25" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 41.25)">
<title>TH</title>
<!-- Node1 -->
<g id="Node000001" class="node">
<title>Node1</title>
<g id="a_Node000001"><a xlink:title=" ">
<polygon fill="#999999" stroke="#666666" points="29.5,-19.25 0,-19.25 0,0 29.5,0 29.5,-19.25"/>
<text text-anchor="middle" x="14.75" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">TH</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node1 -->
<g id="edge2_Node000001_Node000001" class="edge">
<title>Node1&#45;&gt;Node1</title>
<g id="a_edge2_Node000001_Node000001"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M4.08,-19.54C-0.78,-28.15 2.77,-37.25 14.75,-37.25 21.3,-37.25 25.33,-34.53 26.84,-30.65"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="30.35,-30.51 25.61,-21.04 23.41,-31.4 30.35,-30.51"/>
</a>
</g>
</g>
<!-- Node2 -->
<g id="Node000002" class="node">
<title>Node2</title>
<g id="a_Node000002"><a xlink:href="../../db/d3c/tower__of__hanoi_8cpp.html#af4cfc41e546f1f8d25f01e0804e8b61d" target="_top" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="100.25,-19.25 65.5,-19.25 65.5,0 100.25,0 100.25,-19.25"/>
<text text-anchor="middle" x="82.88" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">mov</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node2 -->
<g id="edge1_Node000001_Node000002" class="edge">
<title>Node1&#45;&gt;Node2</title>
<g id="a_edge1_Node000001_Node000002"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M29.77,-9.62C36.78,-9.62 45.52,-9.62 53.83,-9.62"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="53.55,-13.13 63.55,-9.63 53.55,-6.13 53.55,-13.13"/>
</a>
</g>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 2.0 KiB

View File

@@ -1,8 +0,0 @@
<map id="main" name="main">
<area shape="rect" id="Node000001" title=" " alt="" coords="5,29,55,55"/>
<area shape="rect" id="Node000002" href="$db/d3c/tower__of__hanoi_8cpp.html#ab037f72a5eac476535a6cfbbcb965417" title=" " alt="" coords="103,29,142,55"/>
<area shape="poly" id="edge1_Node000001_Node000002" title=" " alt="" coords="55,40,87,40,87,45,55,45"/>
<area shape="poly" id="edge3_Node000002_Node000002" title=" " alt="" coords="106,30,103,21,104,12,111,5,122,3,134,6,140,12,136,16,132,10,122,8,114,10,109,14,108,20,111,28"/>
<area shape="rect" id="Node000003" href="$db/d3c/tower__of__hanoi_8cpp.html#af4cfc41e546f1f8d25f01e0804e8b61d" title=" " alt="" coords="190,29,236,55"/>
<area shape="poly" id="edge2_Node000002_Node000003" title=" " alt="" coords="142,40,174,40,174,45,142,45"/>
</map>

View File

@@ -1 +0,0 @@
5f6bef9872d26ff27dd079913699ca9b

View File

@@ -1,92 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 12.1.2 (20240928.0832)
-->
<!-- Title: main Pages: 1 -->
<svg width="181pt" height="45pt"
viewBox="0.00 0.00 181.25 45.25" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<svg id="main" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve">
<style type="text/css"><![CDATA[
.node, .edge {opacity: 0.7;}
.node.selected, .edge.selected {opacity: 1;}
.edge:hover path { stroke: red; }
.edge:hover polygon { stroke: red; fill: red; }
]]></style>
<script type="application/ecmascript" xlink:href="../../svg.min.js"/>
<svg id="graph" class="graph">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 41.25)">
<title>main</title>
<!-- Node1 -->
<g id="Node000001" class="node">
<title>Node1</title>
<g id="a_Node000001"><a xlink:title=" ">
<polygon fill="#999999" stroke="#666666" points="37,-19.25 0,-19.25 0,0 37,0 37,-19.25"/>
<text text-anchor="middle" x="18.5" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">main</text>
</a>
</g>
</g>
<!-- Node2 -->
<g id="Node000002" class="node">
<title>Node2</title>
<g id="a_Node000002"><a xlink:href="../../db/d3c/tower__of__hanoi_8cpp.html#ab037f72a5eac476535a6cfbbcb965417" target="_top" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="102.5,-19.25 73,-19.25 73,0 102.5,0 102.5,-19.25"/>
<text text-anchor="middle" x="87.75" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">TH</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node2 -->
<g id="edge1_Node000001_Node000002" class="edge">
<title>Node1&#45;&gt;Node2</title>
<g id="a_edge1_Node000001_Node000002"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M37.17,-9.62C44.51,-9.62 53.17,-9.62 61.18,-9.62"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="61.07,-13.13 71.07,-9.63 61.07,-6.13 61.07,-13.13"/>
</a>
</g>
</g>
<!-- Node2&#45;&gt;Node2 -->
<g id="edge3_Node000002_Node000002" class="edge">
<title>Node2&#45;&gt;Node2</title>
<g id="a_edge3_Node000002_Node000002"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M77.08,-19.54C72.22,-28.15 75.77,-37.25 87.75,-37.25 94.3,-37.25 98.33,-34.53 99.84,-30.65"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="103.35,-30.51 98.61,-21.04 96.41,-31.4 103.35,-30.51"/>
</a>
</g>
</g>
<!-- Node3 -->
<g id="Node000003" class="node">
<title>Node3</title>
<g id="a_Node000003"><a xlink:href="../../db/d3c/tower__of__hanoi_8cpp.html#af4cfc41e546f1f8d25f01e0804e8b61d" target="_top" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="173.25,-19.25 138.5,-19.25 138.5,0 173.25,0 173.25,-19.25"/>
<text text-anchor="middle" x="155.88" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">mov</text>
</a>
</g>
</g>
<!-- Node2&#45;&gt;Node3 -->
<g id="edge2_Node000002_Node000003" class="edge">
<title>Node2&#45;&gt;Node3</title>
<g id="a_edge2_Node000002_Node000003"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M102.77,-9.62C109.78,-9.62 118.52,-9.62 126.83,-9.62"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="126.55,-13.13 136.55,-9.63 126.55,-6.13 126.55,-13.13"/>
</a>
</g>
</g>
</g>
</svg>
</svg>
<style type='text/css'>
<![CDATA[
[data-mouse-over-selected='false'] { opacity: 0.7; }
[data-mouse-over-selected='true'] { opacity: 1.0; }
]]>
</style>
<script type="application/ecmascript"><![CDATA[
document.addEventListener('DOMContentLoaded', (event) => {
highlightEdges();
highlightAdjacentNodes();
});
]]></script>
</svg>

Before

Width:  |  Height:  |  Size: 3.6 KiB

View File

@@ -1,66 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 12.1.2 (20240928.0832)
-->
<!-- Title: main Pages: 1 -->
<svg width="181pt" height="45pt"
viewBox="0.00 0.00 181.25 45.25" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 41.25)">
<title>main</title>
<!-- Node1 -->
<g id="Node000001" class="node">
<title>Node1</title>
<g id="a_Node000001"><a xlink:title=" ">
<polygon fill="#999999" stroke="#666666" points="37,-19.25 0,-19.25 0,0 37,0 37,-19.25"/>
<text text-anchor="middle" x="18.5" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">main</text>
</a>
</g>
</g>
<!-- Node2 -->
<g id="Node000002" class="node">
<title>Node2</title>
<g id="a_Node000002"><a xlink:href="../../db/d3c/tower__of__hanoi_8cpp.html#ab037f72a5eac476535a6cfbbcb965417" target="_top" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="102.5,-19.25 73,-19.25 73,0 102.5,0 102.5,-19.25"/>
<text text-anchor="middle" x="87.75" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">TH</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node2 -->
<g id="edge1_Node000001_Node000002" class="edge">
<title>Node1&#45;&gt;Node2</title>
<g id="a_edge1_Node000001_Node000002"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M37.17,-9.62C44.51,-9.62 53.17,-9.62 61.18,-9.62"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="61.07,-13.13 71.07,-9.63 61.07,-6.13 61.07,-13.13"/>
</a>
</g>
</g>
<!-- Node2&#45;&gt;Node2 -->
<g id="edge3_Node000002_Node000002" class="edge">
<title>Node2&#45;&gt;Node2</title>
<g id="a_edge3_Node000002_Node000002"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M77.08,-19.54C72.22,-28.15 75.77,-37.25 87.75,-37.25 94.3,-37.25 98.33,-34.53 99.84,-30.65"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="103.35,-30.51 98.61,-21.04 96.41,-31.4 103.35,-30.51"/>
</a>
</g>
</g>
<!-- Node3 -->
<g id="Node000003" class="node">
<title>Node3</title>
<g id="a_Node000003"><a xlink:href="../../db/d3c/tower__of__hanoi_8cpp.html#af4cfc41e546f1f8d25f01e0804e8b61d" target="_top" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="173.25,-19.25 138.5,-19.25 138.5,0 173.25,0 173.25,-19.25"/>
<text text-anchor="middle" x="155.88" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">mov</text>
</a>
</g>
</g>
<!-- Node2&#45;&gt;Node3 -->
<g id="edge2_Node000002_Node000003" class="edge">
<title>Node2&#45;&gt;Node3</title>
<g id="a_edge2_Node000002_Node000003"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M102.77,-9.62C109.78,-9.62 118.52,-9.62 126.83,-9.62"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="126.55,-13.13 136.55,-9.63 126.55,-6.13 126.55,-13.13"/>
</a>
</g>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 2.8 KiB

View File

@@ -0,0 +1,216 @@
<!-- HTML header for doxygen 1.12.0-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.12.0"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>TheAlgorithms/C++: others/tower_of_hanoi.cpp Source File</title>
<link rel="icon" href="../../favicon.svg" type="image/x-icon" />
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../jquery.js"></script>
<script type="text/javascript" src="../../dynsections.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/@xpack-3rd-party/doxygen-awesome-css@2.2.0-1/doxygen-awesome-darkmode-toggle.js"></script>
<script type="text/javascript">
DoxygenAwesomeDarkModeToggle.init()
</script>
<script type="text/javascript" src="../../clipboard.js"></script>
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../navtreedata.js"></script>
<script type="text/javascript" src="../../navtree.js"></script>
<script type="text/javascript" src="../../resize.js"></script>
<script type="text/javascript" src="../../cookie.js"></script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../search/searchdata.js"></script>
<script type="text/javascript" src="../../search/search.js"></script>
<script type="text/javascript">
window.MathJax = {
options: {
ignoreHtmlClass: 'tex2jax_ignore',
processHtmlClass: 'tex2jax_process'
},
loader: {
load: ['[tex]/ams']
},
tex: {
macros: {},
packages: ['base','configmacros','ams']
}
};
</script>
<script type="text/javascript" id="MathJax-script" async="async" src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js"></script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
<link href="../../doxygen-awesome.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectlogo"><img alt="Logo" src="../../project_logo.png"/></td>
<td id="projectalign">
<div id="projectname">TheAlgorithms/C++<span id="projectnumber">&#160;1.0.0</span>
</div>
<div id="projectbrief">All the algorithms implemented in C++</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.12.0 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
/* @license-end */
</script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() { codefold.init(1); });
/* @license-end */
</script>
<script type="text/javascript" src="../../menudata.js"></script>
<script type="text/javascript" src="../../menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('../../',true,false,'search.php','Search',true);
$(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function(){initNavTree('db/d3c/tower__of__hanoi_8cpp_source.html','../../'); initResizable(true); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div class="header">
<div class="headertitle"><div class="title">tower_of_hanoi.cpp</div></div>
</div><!--header-->
<div class="contents">
<a href="../../db/d3c/tower__of__hanoi_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span> </div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span><span class="preprocessor">#include &lt;iostream&gt;</span></div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span> </div>
<div class="foldopen" id="foldopen00011" data-start="{" data-end="};">
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"><a class="line" href="../../d2/d2c/structtower.html"> 11</a></span><span class="keyword">struct </span><a class="code hl_struct" href="../../d2/d2c/structtower.html">tower</a> {</div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"><a class="line" href="../../d2/d2c/structtower.html#a3ebb75c13c57d51a8a1ba1ea54a515e9"> 13</a></span> <span class="keywordtype">int</span> <a class="code hl_variable" href="../../d2/d2c/structtower.html#a3ebb75c13c57d51a8a1ba1ea54a515e9">values</a>[10];</div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"><a class="line" href="../../d2/d2c/structtower.html#acb535964abd34c47678a4ade0628223d"> 15</a></span> <span class="keywordtype">int</span> <a class="code hl_variable" href="../../d2/d2c/structtower.html#acb535964abd34c47678a4ade0628223d">top</a>;</div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span>};</div>
</div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span> </div>
<div class="foldopen" id="foldopen00019" data-start="{" data-end="}">
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"><a class="line" href="../../db/d3c/tower__of__hanoi_8cpp.html#a746d9a3984bba88fd6dd91978f6931ed"> 19</a></span><span class="keywordtype">void</span> show(<span class="keyword">const</span> <span class="keyword">struct</span> <a class="code hl_struct" href="../../d2/d2c/structtower.html">tower</a> *<span class="keyword">const</span> F, <span class="keyword">const</span> <span class="keyword">struct</span> <a class="code hl_struct" href="../../d2/d2c/structtower.html">tower</a> *<span class="keyword">const</span> T,</div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span> <span class="keyword">const</span> <span class="keyword">struct</span> <a class="code hl_struct" href="../../d2/d2c/structtower.html">tower</a> *<span class="keyword">const</span> U) {</div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span> std::cout &lt;&lt; <span class="stringliteral">&quot;\n\n\tF : &quot;</span>;</div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; F-&gt;<a class="code hl_variable" href="../../d2/d2c/structtower.html#acb535964abd34c47678a4ade0628223d">top</a>; i++) {</div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span> std::cout &lt;&lt; F-&gt;<a class="code hl_variable" href="../../d2/d2c/structtower.html#a3ebb75c13c57d51a8a1ba1ea54a515e9">values</a>[i] &lt;&lt; <span class="stringliteral">&quot;\t&quot;</span>;</div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span> }</div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span> std::cout &lt;&lt; <span class="stringliteral">&quot;\n\tU : &quot;</span>;</div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; U-&gt;<a class="code hl_variable" href="../../d2/d2c/structtower.html#acb535964abd34c47678a4ade0628223d">top</a>; i++) {</div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span> std::cout &lt;&lt; U-&gt;<a class="code hl_variable" href="../../d2/d2c/structtower.html#a3ebb75c13c57d51a8a1ba1ea54a515e9">values</a>[i] &lt;&lt; <span class="stringliteral">&quot;\t&quot;</span>;</div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span> }</div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span> std::cout &lt;&lt; <span class="stringliteral">&quot;\n\tT : &quot;</span>;</div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; T-&gt;<a class="code hl_variable" href="../../d2/d2c/structtower.html#acb535964abd34c47678a4ade0628223d">top</a>; i++) {</div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span> std::cout &lt;&lt; T-&gt;<a class="code hl_variable" href="../../d2/d2c/structtower.html#a3ebb75c13c57d51a8a1ba1ea54a515e9">values</a>[i] &lt;&lt; <span class="stringliteral">&quot;\t&quot;</span>;</div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span> }</div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span>}</div>
</div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span> </div>
<div class="foldopen" id="foldopen00039" data-start="{" data-end="}">
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"><a class="line" href="../../db/d3c/tower__of__hanoi_8cpp.html#af4cfc41e546f1f8d25f01e0804e8b61d"> 39</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="../../db/d3c/tower__of__hanoi_8cpp.html#af4cfc41e546f1f8d25f01e0804e8b61d">mov</a>(<a class="code hl_struct" href="../../d2/d2c/structtower.html">tower</a> *From, <a class="code hl_struct" href="../../d2/d2c/structtower.html">tower</a> *To) {</div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> --From-&gt;<a class="code hl_variable" href="../../d2/d2c/structtower.html#acb535964abd34c47678a4ade0628223d">top</a>;</div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span> To-&gt;<a class="code hl_variable" href="../../d2/d2c/structtower.html#a3ebb75c13c57d51a8a1ba1ea54a515e9">values</a>[To-&gt;<a class="code hl_variable" href="../../d2/d2c/structtower.html#acb535964abd34c47678a4ade0628223d">top</a>] = From-&gt;<a class="code hl_variable" href="../../d2/d2c/structtower.html#a3ebb75c13c57d51a8a1ba1ea54a515e9">values</a>[From-&gt;<a class="code hl_variable" href="../../d2/d2c/structtower.html#acb535964abd34c47678a4ade0628223d">top</a>];</div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> ++To-&gt;<a class="code hl_variable" href="../../d2/d2c/structtower.html#acb535964abd34c47678a4ade0628223d">top</a>;</div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span>}</div>
</div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> </div>
<div class="foldopen" id="foldopen00052" data-start="{" data-end="}">
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"><a class="line" href="../../db/d3c/tower__of__hanoi_8cpp.html#ab037f72a5eac476535a6cfbbcb965417"> 52</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="../../db/d3c/tower__of__hanoi_8cpp.html#ab037f72a5eac476535a6cfbbcb965417">TH</a>(<span class="keywordtype">int</span> n, <a class="code hl_struct" href="../../d2/d2c/structtower.html">tower</a> *From, <a class="code hl_struct" href="../../d2/d2c/structtower.html">tower</a> *Using, <a class="code hl_struct" href="../../d2/d2c/structtower.html">tower</a> *To) {</div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> <span class="keywordflow">if</span> (n == 1) {</div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> <a class="code hl_function" href="../../db/d3c/tower__of__hanoi_8cpp.html#af4cfc41e546f1f8d25f01e0804e8b61d">mov</a>(From, To);</div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span> show(From, To, Using);</div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> } <span class="keywordflow">else</span> {</div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> <a class="code hl_function" href="../../db/d3c/tower__of__hanoi_8cpp.html#ab037f72a5eac476535a6cfbbcb965417">TH</a>(n - 1, From, To, Using);</div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> <a class="code hl_function" href="../../db/d3c/tower__of__hanoi_8cpp.html#af4cfc41e546f1f8d25f01e0804e8b61d">mov</a>(From, To);</div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> show(From, To, Using);</div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span> <a class="code hl_function" href="../../db/d3c/tower__of__hanoi_8cpp.html#ab037f72a5eac476535a6cfbbcb965417">TH</a>(n - 1, Using, From, To);</div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> }</div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span>}</div>
</div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> </div>
<div class="foldopen" id="foldopen00065" data-start="{" data-end="}">
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"><a class="line" href="../../db/d3c/tower__of__hanoi_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4"> 65</a></span><span class="keywordtype">int</span> <a class="code hl_function" href="../../db/d3c/tower__of__hanoi_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a>() {</div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> <span class="keyword">struct </span><a class="code hl_struct" href="../../d2/d2c/structtower.html">tower</a> F, U, T;</div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> </div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> F.<a class="code hl_variable" href="../../d2/d2c/structtower.html#acb535964abd34c47678a4ade0628223d">top</a> = 0;</div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> U.<a class="code hl_variable" href="../../d2/d2c/structtower.html#acb535964abd34c47678a4ade0628223d">top</a> = 0;</div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span> T.<a class="code hl_variable" href="../../d2/d2c/structtower.html#acb535964abd34c47678a4ade0628223d">top</a> = 0;</div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> </div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> <span class="keywordtype">int</span> no;</div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> </div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span> std::cout &lt;&lt; <span class="stringliteral">&quot;\nEnter number of discs : &quot;</span>;</div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span> std::cin &gt;&gt; no;</div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> </div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = no; i &gt; 0; i--) {</div>
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span> F.<a class="code hl_variable" href="../../d2/d2c/structtower.html#a3ebb75c13c57d51a8a1ba1ea54a515e9">values</a>[F.<a class="code hl_variable" href="../../d2/d2c/structtower.html#acb535964abd34c47678a4ade0628223d">top</a>++] = i;</div>
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span> }</div>
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span> </div>
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span> show(&amp;F, &amp;T, &amp;U);</div>
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span> <a class="code hl_function" href="../../db/d3c/tower__of__hanoi_8cpp.html#ab037f72a5eac476535a6cfbbcb965417">TH</a>(no, &amp;F, &amp;U, &amp;T);</div>
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span> </div>
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span> <span class="keywordflow">return</span> 0;</div>
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span>}</div>
</div>
<div class="ttc" id="astructtower_html"><div class="ttname"><a href="../../d2/d2c/structtower.html">tower</a></div><div class="ttdef"><b>Definition</b> <a href="#l00011">tower_of_hanoi.cpp:11</a></div></div>
<div class="ttc" id="astructtower_html_a3ebb75c13c57d51a8a1ba1ea54a515e9"><div class="ttname"><a href="../../d2/d2c/structtower.html#a3ebb75c13c57d51a8a1ba1ea54a515e9">tower::values</a></div><div class="ttdeci">int values[10]</div><div class="ttdoc">Values in the tower.</div><div class="ttdef"><b>Definition</b> <a href="#l00013">tower_of_hanoi.cpp:13</a></div></div>
<div class="ttc" id="astructtower_html_acb535964abd34c47678a4ade0628223d"><div class="ttname"><a href="../../d2/d2c/structtower.html#acb535964abd34c47678a4ade0628223d">tower::top</a></div><div class="ttdeci">int top</div><div class="ttdoc">top tower ID</div><div class="ttdef"><b>Definition</b> <a href="#l00015">tower_of_hanoi.cpp:15</a></div></div>
<div class="ttc" id="atower__of__hanoi_8cpp_html_ab037f72a5eac476535a6cfbbcb965417"><div class="ttname"><a href="../../db/d3c/tower__of__hanoi_8cpp.html#ab037f72a5eac476535a6cfbbcb965417">TH</a></div><div class="ttdeci">void TH(int n, tower *From, tower *Using, tower *To)</div><div class="ttdef"><b>Definition</b> <a href="#l00052">tower_of_hanoi.cpp:52</a></div></div>
<div class="ttc" id="atower__of__hanoi_8cpp_html_ae66f6b31b5ad750f1fe042a706a4e3d4"><div class="ttname"><a href="../../db/d3c/tower__of__hanoi_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a></div><div class="ttdeci">int main()</div><div class="ttdef"><b>Definition</b> <a href="#l00065">tower_of_hanoi.cpp:65</a></div></div>
<div class="ttc" id="atower__of__hanoi_8cpp_html_af4cfc41e546f1f8d25f01e0804e8b61d"><div class="ttname"><a href="../../db/d3c/tower__of__hanoi_8cpp.html#af4cfc41e546f1f8d25f01e0804e8b61d">mov</a></div><div class="ttdeci">void mov(tower *From, tower *To)</div><div class="ttdef"><b>Definition</b> <a href="#l00039">tower_of_hanoi.cpp:39</a></div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="../../dir_9510827d0b234b3cc54b29892f217477.html">others</a></li><li class="navelem"><a class="el" href="../../db/d3c/tower__of__hanoi_8cpp.html">tower_of_hanoi.cpp</a></li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.12.0 </li>
</ul>
</div>
</body>
</html>