@keskiverto is it possible to set the value of f in the curly braces ({})
for example if I want to set the value f based on a branch operation or i through reading a file, how would I go about it
Thanks
cause it's const! const variables can only be initialised as they are defined.
Just use delete as would normally. However, having a pointer to const isn't often that helpful as the memory to which it points can't be changed. You can have a const pointer to memory.
Just make the member variable private. Then your member access arrangements will control what you can do to that variable (setting it in the constructor; doing whatever you want to do in the destructor).