Submitted Questions

  • Empty declaration of a class holds memory 1 byte

    Why empty declaration of a class holds memory 1 byte. Explain briefly?

    Nil

    • Aug 5th, 2012

    Different objects must have different addresses.

    Code
    1. Something *somethigns = new Something[2];
    2. if(somethings[0]==somethings[1])
    3.     exit(-1); // This line must never run.
    4. delete[] somethings;