I have a problem
#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
Any idea how to fix this? It should actually assign A to the char variable and display A right?
Use ‘A’ and not “A”.