Reputation: 233
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'?
Upvotes: 1
Views: 3308
Reputation: 258548
Use std::string
instead.
No, it means you can't modify the char
s.
char*
is a pointer, it doesn't have any functions. You can look up strchr
.
pass[3]
strlen
, but it checks for '\0'
internally.
Upvotes: 8