Documentation for f1eddf4d65

This commit is contained in:
realstealthninja
2025-07-09 10:53:16 +00:00
parent e7edde96ab
commit b41207008f
2497 changed files with 31270 additions and 40283 deletions

View File

@@ -4,7 +4,7 @@
<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.13.2"/>
<meta name="generator" content="Doxygen 1.14.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" />
@@ -19,7 +19,6 @@
<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>
@@ -60,26 +59,20 @@ window.MathJax = {
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.13.2 -->
<!-- Generated by Doxygen 1.14.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 */
$(function() { codefold.init(); });
</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 -->
@@ -94,10 +87,9 @@ $(function() {
</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 */
$(function(){initNavTree('db/d3c/tower__of__hanoi_8cpp_source.html','../../',''); });
</script>
<div id="container">
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
@@ -135,7 +127,7 @@ $(function(){initNavTree('db/d3c/tower__of__hanoi_8cpp_source.html','../../'); i
</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="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> <a class="code hl_function" href="../../db/d3c/tower__of__hanoi_8cpp.html#a746d9a3984bba88fd6dd91978f6931ed">show</a>(<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>
@@ -164,11 +156,11 @@ $(function(){initNavTree('db/d3c/tower__of__hanoi_8cpp_source.html','../../'); i
<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="l00055" name="l00055"></a><span class="lineno"> 55</span> <a class="code hl_function" href="../../db/d3c/tower__of__hanoi_8cpp.html#a746d9a3984bba88fd6dd91978f6931ed">show</a>(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="l00059" name="l00059"></a><span class="lineno"> 59</span> <a class="code hl_function" href="../../db/d3c/tower__of__hanoi_8cpp.html#a746d9a3984bba88fd6dd91978f6931ed">show</a>(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>
@@ -191,7 +183,7 @@ $(function(){initNavTree('db/d3c/tower__of__hanoi_8cpp_source.html','../../'); i
<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="l00081" name="l00081"></a><span class="lineno"> 81</span> <a class="code hl_function" href="../../db/d3c/tower__of__hanoi_8cpp.html#a746d9a3984bba88fd6dd91978f6931ed">show</a>(&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>
@@ -200,16 +192,18 @@ $(function(){initNavTree('db/d3c/tower__of__hanoi_8cpp_source.html','../../'); i
<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_a746d9a3984bba88fd6dd91978f6931ed"><div class="ttname"><a href="../../db/d3c/tower__of__hanoi_8cpp.html#a746d9a3984bba88fd6dd91978f6931ed">show</a></div><div class="ttdeci">void show(const struct tower *const F, const struct tower *const T, const struct tower *const U)</div><div class="ttdef"><b>Definition</b> <a href="#l00019">tower_of_hanoi.cpp:19</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 -->
</div><!-- container -->
<!-- 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.13.2 </li>
<li class="navelem"><a href="../../dir_9510827d0b234b3cc54b29892f217477.html">others</a></li><li class="navelem"><a 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.14.0 </li>
</ul>
</div>
</body>