CJCoding With Joseph
15free / daySign inCreate account

Box Template Class

Create a template class Box<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
Topics:
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.