|
|
|
#1 |
|
Messages: n/a
Hébergeur: |
is this C style coding?
I don't seem to see much C++ code in this way. is this a bad programming practice? code seem ugly coding this way. ================= CATCHERROR(m_Cnn,0) ================= #define CATCHERROR(ptr,a) catch(_com_error &e)\ {\ ErrorHandler(e,m_ErrStr);\ ptr=NULL;\ return a;\ } |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
"Jim Johnson" <aopiyy001@yahoo.com> wrote in message
news:mbldv3lj8etvnsoobt5ou780gq2otn4itn@4ax.com... : is this C style coding? : : I don't seem to see much C++ code in this way. : : is this a bad programming practice? This is not C, but poor C++ code, relying on the preprocessor supposedly to avoid repeating code. This is considered as bad style and poorly maintainable; better alternatives usually exist. However, for lack of context, it is not possible to give you a specific recommendation. : code seem ugly coding this way. : : : ================= : CATCHERROR(m_Cnn,0) : : ================= : #define CATCHERROR(ptr,a) catch(_com_error &e)\ : {\ : ErrorHandler(e,m_ErrStr);\ : ptr=NULL;\ : return a;\ : } -- http://ivan.vecerina.com/contact/?subject=NG_POST <- email contact form Brainbench MVP for C++ <> http://www.brainbench.com |
|
![]() |
| Outils de la discussion | |
|
|