This is the mail archive of the cygwin@sourceware.cygnus.com
mailing list for the Cygwin project. See the Cygwin
home page for more information.
[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index] [Subject Index] [Author Index] [Thread Index]
Win32 Defines & C++
- To: <cygwin@sourceware.cygnus.com>
- Subject: Win32 Defines & C++
- From: "Nirmal Prasad" <nprasad@truept.com>
- Date: Wed, 24 Mar 1999 10:21:04 -0500
- Delivered-To: listarch-cygwin@sourceware.cygnus.com
- Delivered-To: mailing list cygwin@sourceware.cygnus.com
- Mailing-List: contact cygwin-help@sourceware.cygnus.com; run by ezmlm
- Sender: cygwin-owner@sourceware.cygnus.com
hi there,
This is not a cygwin related query,bug or feature request but if someone can
help it will be great b'cos i am getting this problem in some code that i
have while compiling under cygwin.
The problem i am facing is that i have some c++ class that has a member
function which is the same as a win32 define (e.g. GetNextWindow). The
problem is that the pre-processor substitues this and the compiler complains
that there is something wrong. One of the solutions i thought of getting
around this is to make the #define'd macro to an inline function and the
code would then compile but this would be tedious if its a lot of macros . I
was wondering if there is any other elegant solution such that i dont have
to change any code.????
Thanks in advance
Regards
Nirmal Prasad R.
e.g.
#define GetNextWindow(h,c) GetWindow(h,c) /* somewhere in some
win32 header */
//.. This is in my file
class test
{
public:
... some members
void GetNextWindow(uint c); //<- get an error here
as "GetNextWindow" called with 1 argument only
};
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com