title: Problem with const char* in C
body: <p>I am basically trying to get the time with</p>
  
  <pre><code>struct timeval tv = { };
  gettimeofday(&amp;tv, NULL);
  </code></pre>
  
  <p>And it works. The problem is that the function that is going to accept as an argument the time is of type const char*</p>
  
  <p>So i did</p>
  
  <pre><code>const char *time;
  time = &amp;tv.tv_sec;
  </code></pre>
  
  <p>The problem is, that tv.tv_sec is of type time_t and i need to plug it in </p>
  
  <pre><code>const char *time
  </code></pre>
  
  <p>to pass it on to the function that needs const char*</p>
  
  <p>How do i do it? Placing an integer into a const char* 
  I've tried some simple ways of casting it, however i am not that experienced with C </p>