if i have class like Rectangle and i have custom destructor
now i have made 3 variables and when program ends it goes to destructor how i know wich variable die first?
What? It doesn't actually sound like your class needs a destructor (I don't think there's any dynamic memory in it), but the variables will be deleted in what ever order you tell them too.
If you could try rephrasing your question and posting your Rectangle class, it would probably be easier to help.