Close
Close

Finding the index of desired element in a structure

   Ayush_9995

Respected Sir,

Suppose, I constructed a structure ‘Student’ comprising of 5 students with their details like ‘Roll Number’ and ‘Name’. Now,  I wish to choose a name and want to know its index in the structure. So, how can I do that ?? I tried using ‘find_if command from #include <algorithm> library, but I had a hard time understanding how to use the command. Could you please explain me with the example ??

Thanks


Answers

Ask Yours
Post Yours
Write your answer