Using a smart pointer can we iterate through a container?



Using a smart pointer can we iterate through a container?..

Answer / Mulkesh Kumar

Yes, you can iterate through a container using smart pointers in C++. The standard containers such as std::vector, std::list, and std::map provide an iterator interface that can be used with smart pointers like std::shared_ptr and std::unique_ptr.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C++ General Interview Questions

What are the operators in c++?

1 Answers  


What is pointer in c++ with example?

1 Answers  


What is == in programming?

1 Answers  


What are c++ tokens?

1 Answers  


Is there a datatype string in c++?How is the memory allocation?

3 Answers  


How are virtual functions implemented in c++?

1 Answers  


Write a C/C++ program to show the result of a stored procedure "PROC_RESET_MAIL" on database "USER_NOTIFY".

2 Answers   ABC, Accenture, DataLand, HCL, Webyog,


Which is the best c++ software?

1 Answers  


List down the guideline that should be followed while using friend function.

1 Answers  


Explain terminate() and unexpected() function?

1 Answers  


Write a program using merge () function to combine the elements of array x[ ] and y[ ] into array z[ ].

1 Answers  


Do you know what are pure virtual functions?

1 Answers  


Categories