Hello, I've just started learning C++, and I can't figure out the issue with my code. I've tried a few different ways to get a switch to work with a single declaration, and for each case to assign different values to a char, but I keep getting incompatible types in assignment of 'const char' to 'char'. How am I using these two things wrong? I've already gone through a few posts on here, but I can't find anything that helps.
will all not work as you have incompatible types (e.g. "Guard" is a char[6] but you're trying to assign it to a char[10]). This is not how to copy an array of char.
You're making it much harder on yourself by using arrays of char. Don't use arrays of char. Use proper C++ string objects.