bool check(const char* pass);
-
Does const mean that I cannot modify char* inside the function?
-
Does char* c has any function like contains(char c) which checks if the char is inside char*?
-
How to get to 4th character in the char*?
-
Is there any function which gives the length of that char*. Beside checking where is ‘\0’?
Use
std::stringinstead.No, it means you can’t modify the
chars.char*is a pointer, it doesn’t have any functions. You can look upstrchr.pass[3]strlen, but it checks for'\0'internally.