Nameless temporary objects in c++

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bsaritha10
    New Member
    • Mar 2010
    • 1

    Nameless temporary objects in c++

    tell me how to create nameless temporary objects in C++?
    for what it is useful
  • Banfa
    Recognized Expert Expert
    • Feb 2006
    • 9067

    #2
    You don't create nameless temporary objects, the compiler does, it can happen when
    • the code uses an object direct by just calling its constructor without assign that object to a variable.
    • When returning from a function that returns an object.

    Comment

    Working...