if you're not using pointers, the only way to really destroy an object is to let it run out of scope. in that case, you'd get a compile error when you hit the statements with them in it. if you're talking dynamic memory, you're talking new/delete, and this is how you could do it (essentially what Sfpiano just told you about the pointers):
Code:
#include<iostream>
struct test //I'm using this in place of your classes
{
int i; //just some dummy data
};
int main()
{
test a; //instantiate test
test*b=new test; //create a test pointer, and initilize it
a.i=0; //fill in the dummy data for a
b->i=1; //fill in the dummy data for b
delete b; //delete b
b=0; //make the pointer point to nothing (NULL)
std::cout<<a.i; //output a
if(b!=0) //check if b pointer is pointing to a test
{
std::cout<<'\n'<<b->i; //if it is, print it
}
std::cout<<std::endl; //either way put a newline & flush the stream
return 0; //return 0
}