<html> <head> <title>main.cpp</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <style type="text/css"> .s0 { color: #b3ae60;} .s1 { color: #bcbec4;} .s2 { color: #6aab73;} .s3 { color: #cf8e6d;} .s4 { color: #bcbec4;} .s5 { color: #2aacb8;} </style> </head> <body bgcolor="#1e1f22"> <table CELLSPACING=0 CELLPADDING=5 COLS=1 WIDTH="100%" BGCOLOR="#606060" > <tr><td><center> <font face="Arial, Helvetica" color="#000000"> main.cpp</font> </center></td></tr></table> <pre><span class="s0">#include </span><span class="s2"><iostream></span> <span class="s0">#include </span><span class="s2">"twoDarraysChar.h"</span> <span class="s3">void </span><span class="s1">test2DcharArray</span><span class="s4">() {</span> <span class="s3">char </span><span class="s4">**</span><span class="s1">pp </span><span class="s4">= </span><span class="s1">create2DarrayCharDereference</span><span class="s4">(</span><span class="s5">3</span><span class="s4">, </span><span class="s5">4</span><span class="s4">);</span> <span class="s1">populateCharReverse</span><span class="s4">(</span><span class="s1">pp</span><span class="s4">, </span><span class="s5">3</span><span class="s4">, </span><span class="s5">4</span><span class="s4">);</span> <span class="s1">traverseCharDereference</span><span class="s4">(</span><span class="s1">pp</span><span class="s4">, </span><span class="s5">3</span><span class="s4">, </span><span class="s5">4</span><span class="s4">);</span> <span class="s1">traverseCharSingleLoopDereference</span><span class="s4">(</span><span class="s1">pp</span><span class="s4">, </span><span class="s5">3</span><span class="s4">);</span> <span class="s1">sort</span><span class="s4">(</span><span class="s1">pp</span><span class="s4">, </span><span class="s5">3</span><span class="s4">, </span><span class="s5">4</span><span class="s4">);</span> <span class="s1">std</span><span class="s4">::</span><span class="s1">cout </span><span class="s4"><< </span><span class="s1">std</span><span class="s4">::</span><span class="s1">endl</span><span class="s4">;</span> <span class="s1">traverseCharSingleLoopDereference</span><span class="s4">(</span><span class="s1">pp</span><span class="s4">, </span><span class="s5">3</span><span class="s4">);</span> <span class="s1">freeMemoryCharDereference</span><span class="s4">(</span><span class="s1">pp</span><span class="s4">, </span><span class="s5">3</span><span class="s4">);</span> <span class="s4">}</span> <span class="s3">int </span><span class="s1">main</span><span class="s4">() {</span> <span class="s1">std</span><span class="s4">::</span><span class="s1">cout </span><span class="s4"><< </span><span class="s2">"Hello, World!" </span><span class="s4"><< </span><span class="s1">std</span><span class="s4">::</span><span class="s1">endl</span><span class="s4">;</span> <span class="s1">test2DcharArray</span><span class="s4">();</span> <span class="s3">return </span><span class="s5">0</span><span class="s4">;</span> <span class="s4">}</span> </pre> </body> </html>