What is the alternative function of "indexof()" in C++??? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

What is the alternative function of "indexof()" in C++???

String is an array of character right? So I'm wondering if you can also get the index of it with some functions like in java

11th Aug 2020, 6:17 AM
Jayp Bazar
Jayp Bazar - avatar
1 Answer
+ 2
you can use "find()" for strings which does exactly the same job for more info visit👇 https://www.geeksforgeeks.org/string-find-in-cpp/
11th Aug 2020, 6:30 AM
Arsenic
Arsenic - avatar