C++ strtok: how to get and assign
<p>I use the following code and get the output below.</p>

<p>Original string is <code>-CCY 1.2624 Up 0.0006(0.05%) 01:37 [37]</code></p>

<pre><code>char* pch;

 pch = strtok (buffer," ");

  while (pch != NULL)
  {
    printf ("%s\n",pch);
    pch = strtok (NULL, " ");

  }
</code></pre>

<p>This is my output </p>

<pre><code>CCY
1.2624
Up
0.0006(0.05%)
01:37
SGT
[37]
</code></pre>

<p>How do I get the <em>1.2624</em> and assign it to a cstr so i can use it later like <code>printf</code> or something when outside of the while loop?</p>
