I am wondering which is the better methond of implemetation?
METHOD # 1
or
METHOD #2
haunter@battlestrata.com
METHOD # 1
Code:
try
{
/* try catch block may not BE
best error implementation */
m_p = new char[m_size];
}
catch(bad_alloc xa)
{
cout << "Allocation Errors\n";
exit(1);
}
METHOD #2
Code:
m_p = new char[m_size];
assert(m_p != 0); /*Another error preventtion tool for above can be turned off with macors */
haunter@battlestrata.com