cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
General C++ Programming
Mid-Beginner C++ problem
Mid-Beginner C++ problem
Dec 26, 2015 at 6:43pm UTC
AgathonXXI
(4)
In Python, I can use "in" to state that this is inside that.
For example: if "this" in stringX; print ("yadadada")
else print ("Sally mcSalad")
How can I use this function in C++?
Thanks! =)
Dec 26, 2015 at 6:54pm UTC
Chervil
(7320)
Do you mean something like find() or one of its related functions.
See reference (and example code)
http://www.cplusplus.com/reference/string/string/find/
Dec 26, 2015 at 7:25pm UTC
Moschops
(7244)
You've done a pretty bad job of explaining what the function you're describing does. I'd guess you're asking about the existence of a standard C++ function to check if a given string is a substring of another string. Is that what you're asking?
Dec 27, 2015 at 9:10am UTC
AgathonXXI
(4)
+Moschops Yes, that's exactly what I meant.
+Chervil Thanks, that's it!
Topic archived. No new replies allowed.