#Difference between and ' in C++?
10 messages · Page 1 of 1 (latest)
When your question is answered use !solved to mark the question as resolved.
Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question run !howto ask.
Char uses ‘ ‘ single quotes
The things you put inside your array are c strings, of type const char[]
But the array is supposed to hold characters
thanks! another thing:
int main() {
// \0 is a NULL charecter to mark the end of the string
char str[6] = { 'H', 'e', 'l', 'l', 'o', '\0' };
std::cout << str;
std::cout << str;
}
the \0 marks the end of the string but if i remove it, seemingly nothing changes? i printed the string twice to see if it would maybe change what lines they print on but it stays the same