← Back to Templates
Question 155
Box Template Class
Box Template Class
Create a template classBox<T>that stores a single value of any type. Implement: -set(T value): stores the value -get(): returns the stored value Do NOT write a main function.
Expected Output:
42 hello
= newline. The output ends with a newline — print one after the last line.
Hints2 available
Sign in to use hintsTopics:
Templates
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Shift+Alt+F to format · Ctrl+Space to expand shortcuts (cout, fori)
Your Output
Run your code to see the output here...
Test Cases
Run your code to see test case results.