On Mon, Mar 15, 2010 at 8:43 PM, nimak247 <[email protected]> wrote:

> Thanks Sumant!!
>
> If I may ask a follow up question, how does the following line work:
> myT test = (myT)new myT;
>
> It looks like it is casting the type before the 'new' operator??
>
> Any help would be appreciated!

It is wrong. new does not require a cast. When using new with a
struct, is uses a default constructor (just like with a class).
Casting is totally unnecessary.

-- Brett
------------------------------------------------------------
"In the rhythm of music a secret is hidden;
    If I were to divulge it, it would overturn the world."
               -- Jelaleddin Rumi

Reply via email to