Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

c++ quetion

1 view
Skip to first unread message

anju.a...@gmail.com

unread,
Sep 30, 2008, 8:00:24 AM9/30/08
to
void main()
{
int a=5,b=6;
int *i=new int;
int *j=new int;
cout<<"i="<<i<<"j="<<j;
delete i;
cout<<"i="<<i<<"j="<<j;
delete j;
cout<<"i="<<i<<"j="<<j;
getch();
}

after deleting i and j these are still printined three times why?
if i write return after the every delete then there will be any bug in
program?

0 new messages