Macro Overriding Class Member
<p>Ok so I'm learning to program for multiple platforms and I saw that lots of includes/libraries use Macros to tell the compiler which functions to call on specific platforms.</p>

<p>So I went ahead and defined the following:</p>

<pre><code>#if defined _WIN32 || defined _WIN64
    #define Close(Handle) CloseHandle(Handle)
#else
    #define Close(Handle) close(Handle)
#endif
</code></pre>

<p>But then my Socket class has the following member function:</p>

<pre><code>Socket::Close()
{
    //Close socket and clean up..
}
</code></pre>

<p>When I do the following:</p>

<pre><code>Socket sock(Port, LocalHost);
sock.Close();
</code></pre>

<p>I get:</p>

<pre><code>error: 'class Socket' has no member named 'CloseHandle'
     #define Close(Handle) CloseHandle(Handle)
                           ^
note: in expansion of macro 'Close'
       sock.Close();
            ^
</code></pre>

<p>Any ideas how I can fix it or should I just get rid of the Close and make it a typedef?</p>
