Posts tagged as:

Pointers

Safe Programming

by Shabbir on August 22, 2008

in C/C++

Once doing Code Review I found a code snippet like this and so thought would share my experience here.
CDialog *SomeDialog = new CMyDialog(<<Some Param>>);
SomeDialog->SomeFunction(this);
In the above code we always assume that SomeDialog is always allocated with the CMyDialog class pointer but that may not be the case always and so its always better to have [...]

{ View Comments }

    About the Author

  • author photo

    My Name is Shabbir Bhimani and I am developer by profession in the field of applications, web and database. Currently doing full time online marketing and like to share my experiences on how you can make money online @ CodeItWell.com. Read more ...


    See how you can get in touch with me.