How convert std::string to byte : <p>I want to convert a string to a byte, but I don't know how.
This is my code:</p>

<pre><code>void keyboard::SimKey(std::string def)
{
    keybd_event(def, 0, 0, 0);
}
</code></pre>

<p>I don't know how to change def to a byte.</p>
