I just get lost with strings, I'm not even coding with it right now, I need some people to just explain it to me. Whenever I do try coding with it, only the first character makes it through or I get compiling errors reading:
could not convert `(&Spell)>std::basic_string<_CharT,_Traits,_Alloc>::operator= [with _CharT = char, _Traits=std::char_traits<char>,_Alloc=std::allocator<char>](((const char*)"Alex"))' to `bool'
I usually try to use the strings with conditional statements, like if's.
1 2 3 4 5 6
if(name="Alex"){
cout << "Hello, Alex." << endl;
}
else{
cout << "You're not Alex! Get off this computer!" << endl;
}