|
Using double quotes ("") in C and C++ returns a constant character pointer which points to a null-terminated string in the static section of memory. So if you write char* ptr = "dog"; you get ptr pointing to a character array consisting of 'd', 'o', 'g', and '\0', the null terminator.
What you're looking to do is use single quotes. When you type "=", you get the C-string "=". What you want to do is '=', with single quotes. This returns a plain character.
Edit: whoops too late
|