How do you declare a set in c++?



How do you declare a set in c++?..

Answer / Akash Kumar Kharwar

To declare a set in C++, you first include the corresponding header file (<set>), and then use the set container with template parameters. For example: nn`std::set<int> mySet;`nCreates an empty set of integers.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C++ General Interview Questions

How do you remove an element from a set in c++?

1 Answers  


What is the equivalent of Pascal's Real a) unsigned int b) float c) char

1 Answers  


What is the use of endl in c++ give an example?

1 Answers  


What is near, far and huge pointers? How many bytes are occupied by them?

1 Answers  


What are the effects after calling the delete this operator ?

1 Answers  


What does it mean to declare a member function as virtual?

1 Answers  


When does the c++ compiler create temporary variables?

1 Answers  


Define anonymous class.

1 Answers  


Is main a class in c++?

1 Answers  


How important is c++?

1 Answers  


What is the use of volatile variable?

1 Answers  


What is the full form of dos?

1 Answers  


Categories