Good evening,
a new evening a new question :D
May you know what i've not understood here, in the declaration is a 2nd const, i've no idea what is the difference between them. When i run the code it sounds both nice.
void theStrlnMethod() {
//TODO why need i to add const two times here? :D
const char* const TEXT1 = "123";
std::cout << TEXT1 << "\nenthält " << strlen(TEXT1) << " Zeichen\n";
//TODO does that also work without the 2nd const?
const char* TEXT_JUST_ONE_CONST = "123";
std::cout << TEXT_JUST_ONE_CONST << "\nenthält " << strlen(TEXT_JUST_ONE_CONST) << " Zeichen\n";
}
output:
123
enthõlt 3 Zeichen
123
enthõlt 3 Zeichen