You should not store the address returned by string::c_str. (And that address should certainly not be equal to whatever text is contained in the string address.)
Sorry for wrong termins.
By input i mean if string to convert is "0x00309E40" then converted lpvoid is 0x13db92cc.
How could i convert input from ui->lineEdit->text() to proper format for adress lpvoid?
I tryed above code and compiler returned:
error: aggregate 'std::stringstream stream' has incomplete type and cannot be defined
std::stringstream stream;
^
If i put
std::string ii = "0x00309E40";
(LPVOID)&ii
Then code compiles but wont work, if i enter lpvoid manually it works.