[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
#ifndef main
From: |
address@hidden |
Subject: |
#ifndef main |
Date: |
Fri, 25 Jul 2008 06:56:20 -0700 (PDT) |
User-agent: |
G2/1.0 |
I have two files and the contents are as follows :
file :: main.h
-------------------------------------
#ifndef main
#define main
#endif
--------------------------------------
file :: main.cpp
-------------------------------------
#include "main.h"
int main(void)
{
return 0 ;
}
------------------------------------
This program does not compile and the error message that I get is ::
expected unqualified-id before ‘void’
expected `)' before ‘void’
After some digging I have established that the problem lies in the
line
#ifndef main
If I change it to
#ifndef Main or #ifndef MAIN etc it works
May somebody please shed some light on this ?
Thanks
- #ifndef main,
address@hidden <=