Computer Science, asked by rajushande148, 9 months ago

)
Which header file should we include for
using std::auto.ptr ?
हमें std::auto.ptr का उपयोग करने के लिए कौन
सा हेडर फाइल को शामिल करना चाहिए?
Select one:
a. < memory>
< memory>
6. < alloc>
< alloc>
c. < smartptr>
< smartptr>
d. < autoptr>
< autoptr>
B​

Answers

Answered by avaneeshshinde191
0

Answer:

MEMO RY

Explanation:

OK. HOPE IT'S HELPFUL

Answered by Jasleen0599
0

Option d): < autoptr>

< autoptr> header file should we include for using std::auto.ptr

  • An object obtained using a new expression is managed by the smart pointer auto ptr, which also deletes the object when auto ptr is destroyed.
  • Because auto ptr's copy function Object() { [native code] } does not adhere to container CopyConstructible's requirements, it cannot be utilized in STL containers. Because unique ptr does not have a copy function Object() { [native code] }, containers must utilize other techniques.
  • Although not atomic-free, this method of passing an object from one thread to another is entirely threadsafe and lock-free. A queue is usually the best option if you have a lot of these items, but occasionally that's a little too heavyweight for your purposes.

#SPJ2

Similar questions