Name
operator!= function template — Compares strings for inequality
Synopsis
template<class charT, class traits, class Allocator> bool operator!=( const basic_string<charT,traits,Allocator>& a, const basic_string<charT,traits,Allocator>& b); // bool operator!=(const string& a, const string& b); template<class charT, class traits, class Allocator> bool operator!=(const charT* a, const basic_string<charT,traits,Allocator>& b); // bool operator!=(const char* a, const string& b); template<class charT, class traits, class Allocator> bool operator!=(const basic_string<charT,traits,Allocator>& a, const charT* b); // bool operator!=(const string& a, conat char* b);
The !=
operator compares
two strings for inequality or compares a string and a
null-terminated character array. It returns !(a
==
b)
.
See Also
Get C++ In a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.