#ifndef~#endif


jaoji72
12-08-2006, 03:17 AM
Hellow every kind helpers.

I have a simple question.

Can I get rid of the

#ifndef _NR_H_
#define _NR_H_

and

#endif :confused:

Even if it would be something duplicated but not complicated to implement, I guess.

Am I right?

helix
06-17-2007, 05:16 PM
I wouldn't recommend it - the compiler will likely complain about multiple definitions. The whole point of the #ifndef 'sentinels' is to prevent such errors. Hope this makes sense.

yinyang
07-04-2007, 11:21 AM
this is C/C++ issue, not NR issue.

http://www.cppreference.com/preprocessor/preprocessor_if.html