Hi all...
I Have 2 questions.
1. Does STL containers have their default destructors. Are they called by default to destroy the container when that container goes out of scope?
2. I have two classes: class Telescope and class Panel. (in reality panels correspond to mirrors that are placed on large telescope reflector). A class telescope contains list<Panel> tel_pans. My question is When a Telescope object (let us say T) instantiated in main() goes out of scope does (compiler) default Telescope destructor automatically destroys the list<Panel>tel_pans ? Or free store memory allocated by list will stay floating even after destruction of T ??...
please help...
Attaching the header file of declarations to give better idea.
#ifndef RAY_TRACING_HEADER_LOADED
#define RAY_TRACING_HEADER_LOADED
//... all necessary include statements ...//
using namespace std;
const double DEPS=1.0e-14;
const double FEPS=1.0e-6;
// A base class that defines some basic functionality
class GeomOps {
public :
... 1st function
....nth function
virtual void display()=0 // Making this class as abstract base class
};
class Panel: public GeomOps
{
private:
// ... data members related to single panel
public: [i]//constructors of panel class and function to modify data members of panel
// values of data have to be read from a file containing info abt all panels [/i]
void SetPaneldata(int i,double k, double x, double y,double z, double roc, double f);