This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Namespaces and pre-processing directives
- From: "Megha Murarka" <megha at poseidontech dot com>
- To: "gcc-help" <gcc-help at gcc dot gnu dot org>
- Date: Fri, 4 Apr 2003 15:49:40 +0530
- Subject: Namespaces and pre-processing directives
- References: <1038476880.12170.ezmlm@gcc.gnu.org> <007a01bfdf54$30b553e0$1801a8c0@blr.vsnl.net.in>
Hi All,
The program given below compiles fine.
but if we use the statement ,
int x = MYSPACE::VALUE +1;
It gives an error. Why is it so ? (when the #define is present inside the
scope of the namespace ) ????
****************************************************************************
**
namespace MYSPACE{
#define VALUE 50;
};
int main(){
int x = VALUE + 1;
return 1;
}
Regards,
Megha