kulanthai velu wrote:

>      i hope everyone knows ....con't overload .,.*,?:,::,Sizeof .#,##,
>
> why we con't overload what is it behind .......why we con't overload 
> any specific reson for that !!!!!
>
For operator . it would be a problem, because then you can't use the 
members of the object anymore. The for operator .* and :: (for static 
members).

For ?: I'm not sure: it would have to return one of the two expressions 
after ?, but only that one should be evaluated, not both, if you 
overload it they would be evaluated both (actually || and && don't 
always evaluate the second argument, but if you overload them it is 
always evaluated, that's way many people consider it bad to overload 
them). I think they didn't allow it because it isn't necessary and it 
would allow a programmer to do things that are too different from the 
standard behavior.

# and ## are preprocessor commands, so you can't overload these. Why 
would you want to overload sizeof? The standard says it returns the 
number of bytes in memory that the object uses, there's no reason to 
change that.

> i would like to know  sizeof why i could not overload !!!!!!!!!!
>
> what is the different between Mallco ,New ... what is the different 
> internal process .
>
malloc only allocates memory. new allocates memory and also calls 
constructor, so your constructor can intialize the memory, that is much 
cleaner and safer.

-- 
  Mark Van Peteghem
  http://www.q-mentum.com -- easier and more powerful unit testing



------------------------ Yahoo! Groups Sponsor --------------------~--> 
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/EbFolB/TM
--------------------------------------------------------------------~-> 

To unsubscribe : [EMAIL PROTECTED]

 
Yahoo! Groups Links

<*> To reply to this message, go to:
    http://groups.yahoo.com/group/Programmers-Town/post?act=reply&messageNum=3778
    Please do not reply to this message via email. More information here:
    http://help.yahoo.com/help/us/groups/messages/messages-23.html

<*> To visit your group on the web, go to:  
    http://groups.yahoo.com/group/Programmers-Town/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to