error: could not convert 'user_input.std::basic_string<_CharT, _Traits, _Alloc>::operator=<char, std::char_traits<char>, std::allocator<char> >(((const char*)"start"))' from 'std::basic_string<char>' to 'bool'|
user_input has been declared a string in my header file:
int main()
{
std::cout<<"Tye the word \"start\" to begin: ";
std::getline(std::cin, user_input);
if(user_input = "start")
{
std::cout<<"started properly. . user_input var is working. . . move on"<<std::endl;
}
}
I realize this code is meaningless, but I'm starting small and testing everything constantly before I build more on it.
I had received this before and was able to fix it. . . somehow. I don't remember how I fixed it. Also, I've tried using "start" and 'start' but get the same result both ways. I always get it mixed up which I'm supposed to use in that regard.