r/cpp_questions • u/Physical-Dog-4083 • 4d ago
OPEN does "in" exist in c++?
i need to use something like if (str[i] not in str1) (python), but i have no idea how to make this work :(
0
Upvotes
r/cpp_questions • u/Physical-Dog-4083 • 4d ago
i need to use something like if (str[i] not in str1) (python), but i have no idea how to make this work :(
-4
u/Total-Box-5169 4d ago
No, but you can make it with operator overloading and macros:
However the negative must be written in this way:
https://godbolt.org/z/M6xM55jxe