Please can someone explain what I'm seeing here? I expected the same result, a compiler error, in both situations. What's different when the variables are part of the struct? Sorry if the answer is blatantly obvious and I'm just not seeing it...
Code:
std::string str_one = 'a'; // Compiler error
CString str_two = 'a'; // Compiler error
struct MyStruct
{
std::string str_one;
CString str_two;
};
MyStruct my_struct;
my_struct.str_one = 'a'; // OK
my_struct.str_two = 'a'; // OK