How do I pass an argument that was passed to main (in argv) to my function?
<p>How can i pass argv[] to my function?, I am getting the errors when I run my program. I am new to c++ but i think i am not passing it right look at the error and my code. Now dont worry about the Depth First algorithm.. i will get to that later.. I am just trying to make this work.., basically I just want to pass the *argv[] to evaluate them in my printDepthFirst() but something is not right (obviously) .. Thank you</p>

<pre><code>myprogram.c: In function ‘main’:
myprogram.c:18:4: warning: passing argument 1 of ‘opendir’ makes pointer from integer without a cast
/usr/include/dirent.h:135:13: note: expected ‘const char *’ but argument is of type ‘char
</code></pre>

<p>code</p>
