Use the weak_ptr member function to create a shared_ptr to the resource observed by the weak_ptr.
a. lock
b. use_count
c. reset
d. getSharedPtr
a. lock
You might also like to view...
A(n) ____ variable can serve as a condition in an if or while statement.
A. String B. Boolean C. Object D. Number
Analyze the following two programs:
``` A: public class Test { public static void main(String[] args) { xMethod(5); } public static void xMethod(int length) { if (length > 1) { System.out.print((length - 1) + " "); xMethod(length - 1); } } } B: public class Test { public static void main(String[] args) { xMethod(5); } public static void xMethod(int length) { while (length > 1) { System.out.print((length - 1) + " "); xMethod(length - 1); } } } ``` a. The two programs produce the same output 5 4 3 2 1. b. The two programs produce the same output 1 2 3 4 5. c. The two programs produce the same output 4 3 2 1. d. The two programs produce the same output 1 2 3 4. e. Program A produces the output 4 3 2 1 and Program B prints 4 3 2 1 1 1 .... 1 infinitely.