title: OpenCV - cvCreateTrackbar()
body: <p>If you see <code>cvCreateTrackbar()</code> from: <a href="http://opencv.willowgarage.com/documentation/user_interface.html" rel="nofollow">http://opencv.willowgarage.com/documentation/user_interface.html</a></p>
  
  <p>If you look at the function signature:</p>
  
  <pre><code>int cvCreateTrackbar(const char* trackbarName, const char* windowName, int* value, int count, CvTrackbarCallback onChange)
  </code></pre>
  
  <p>It describes for example the function parameter <code>trackbarName</code> as follows:</p>
  
  <pre><code>trackbarName – Name of the created trackbar.
  </code></pre>
  
  <p>In the <code>Learning OpenCV</code> book, it had the following function signature:</p>
  
  <pre><code>cvCreateTrackbar("Position","Example3",&amp;g_slider_position,frames,onTrackSlide);
  </code></pre>
  
  <p><code>trackbarName</code> as we see is a pointer to a <code>char</code>, and thus has to hold an address as its value. How come we are passing <code>"position"</code> as an argument? And, isn't <code>"position"</code> a <code>string</code>, how can we pass that to a <code>char</code>?</p>
  
  <p>Thanks.</p>