c++ - How to split a given string from input to different types of variables?
<p>I want to be able to get a line and split it to different types of variables (using standard c++ libraries). So this input line:</p>

<pre><code>C 56 99.7 86.7 9000
</code></pre>

<p>Will "explode" by a space char to these variables in order:</p>

<pre><code>Char
std:string
double
double
double
</code></pre>

<p>This is how I currently handle the given input:</p>

<pre><code>#define MAX_LINE 200

char line[MAX_LINE];
cout &lt;&lt; "Enter the line: ";
cin.getline (line,MAX_LINE);
</code></pre>

<p>Is there some special function like <code>getline()</code> i can use to separate the given input and assign these input to variables (with casting or similar)? </p>
