我有一个LPWSTR
类型的变量,其中包含"true"
或"false"
。
有没有办法用true
或false
将其转换为bool类型的变量?
理想情况下,我想做这样的事情:
FooClas::MyMethod()
{
LPWSTR variableone;
bool variableTwo;
MyMethodOne(&variableone);
// At this point,variableone can be either "true" or "false".
// Do something to check if "true",then variableTwo = true,otherwise variableTwo = false.
}