我有个问题
#include <iostream>
int main()
{
char a;
a = "A";
std::cout<<a;
return 0;
}
1>c:\users\user\desktop\c++\bool 1\bool 1\bool 1.cpp(6): error C2440: '=' : cannot convert from 'const char [2]' to 'char'
1> There is no context in which this conversion is possible
知道如何解决这个问题吗?它实际上应该将 A 分配给 char 变量并显示 A 对吗?