Dynamic allocatonThese variables are created when we need'em and then they must be deleted.
notice that these variables are generated during the excution time not in the compiling time as the other variables.Creating a new variable :
eg : int * xPtr = new int ;
eg : char * NamePtr = new char[17] ;Deleting it :
eg : delete xPtr;
eg : delete [17] NamePtr ;
No comments:
Post a Comment