on left side of new there should be pointer that should collect the address
of the memory allocated..

write.

ABC *a=new ABC();


correct if wrng...

On Fri, Mar 9, 2012 at 8:19 PM, sanjiv yadav <sanjiv2009...@gmail.com>wrote:

> write..
>
> Abc a=Abc()
>
> it will execute...
>
>
> On Fri, Mar 9, 2012 at 8:15 PM, ~*~VICKY~*~ <venkat.jun...@gmail.com>wrote:
>
>> #include<iostream>
>> using namespace std;
>> class Abc
>> {
>>
>>     public :
>>     int i;
>>     Abc(){ i = 0;}
>>
>> };
>> int main()
>> { Abc a = new Abc();
>>     cout<<a.i;
>> }
>>
>>
>> --
>> Cheers,
>>
>>   Vicky
>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Algorithm Geeks" group.
>> To post to this group, send email to algogeeks@googlegroups.com.
>> To unsubscribe from this group, send email to
>> algogeeks+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/algogeeks?hl=en.
>>
>
>
>
> --
> Regards....
>
> Sanjiv Yadav
>
> MobNo.-  8050142693
>
> Email Id-  sanjiv2009...@gmail.com
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algogeeks@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to