How do I compare two characters in a string in C++?

strcmp() in C/C++ This function is used to compare the string arguments. It compares strings lexicographically which means it compares both the strings character by character. It starts comparing the very first character of strings until the characters of both strings are equal or NULL character is found.

Sizin İçin Seçtik  Is there an ignore case function in C++?

Leave a Reply

Your email address will not be published. Required fields are marked *