Visual C++ Projects
25.int *i=0x400// i points to address 400
26.*i=0;//set the value of memory location pointed by i.
Incomplete types are otherwise called uninitialized pointers.
34.ptr = new int(i);
43.cout << \"The value is \" << *ptr;
47.void SomeFunc(Sample x)
49.cout << \"Say i am in someFunc \" << endl;
54.Sample s1 = 10;
above example when PrintVal() function is
A class that has no functionality of its own. Its member functions hide
the use of a third party software component or an object with the
non-compatible interface or a non-object-oriented implementation.
class whose purpose is to indicate that a real object of that class
does not exist. One common use for a null object is a return value from
a member function that is supposed to return an object with some
specified properties but cannot find such an object.
condition that defines all valid states for an object. It is a logical
condition to ensure the correct working of a class. Class invariants
must hold when an object is created, and they must be preserved under
all operations of the class. In particular all class invariants are
both preconditions and post-conditions for all operations or member
functions of the class.
process during exception handling when the destructor is called for all
local objects between the place where the exception was thrown and
where it is caught.
Precondition: A precondition is a condition that must be true on entry
to a member function. A class is used correctly if preconditions are
never false. An operation is not responsible for doing anything
sensible if its precondition fails to hold. For example, the interface
invariants of stack class say nothing about pushing yet another element
on a stack that is already full. We say that isful() is a precondition
of the push operation. Post-condition: A post-condition is a condition
that must be true on exit from a member function if the precondition
was valid on entry to that function. A class is implemented correctly
if post-conditions are never false. For example, after pushing an
element on the stack, we know that isempty() must necessarily hold.
This is a post-condition of the push operation.
66.template <class t="">
73.T& operator (int index);
74.const T& operator (int index)const;
77.Array1D operator (int index);
78.const Array1D operator (int index) const;
The following then becomes legal:
data yields an Array1D object
A node class is a class that has added new services or functionality beyond the services inherited from its base class.
container class is a class that is used to hold
objects in memory or