[prog] use of the new and delete operator...
Tim King
timk at jtse.com
Thu Jul 12 22:25:54 UTC 2007
sena emre <senaemre at yahoo.com> wrote:
> struct sol{
> .
> .
> .
> };
>
> sol S;
>
> S *sco = NULL;
>
> sco = new sol[my.sco];
>
> delete [] sco;
>
> but this does'nt work...what should I do?
>
Hi, Sena. I think you want to do:
struct sol{
.
.
.
};
sol* sco = 0;
sco = new sol[my.sco];
delete [] sco;
Does that help?
-TimK
--
http://LucrativeWebDesign.com/
http://www.JTimothyKing.com/blog/
More information about the Programming
mailing list