Error LNK2001 when instantiating a class with parameters within a constructor
<p>Good afternoon,</p>

<h2>Issue #1</h2>

<p>I have a mysterious issue, where I can call a class I've defined without any issues, however if I try to add a parameter to the constructor, and instantiate the class with an argument, it gives two <code>LNK2001</code> errors, one for the constructor and one for the destructor.</p>

<pre><code>error LNK2001: unresolved external symbol "public: __thiscall socket_h::~socket_h(void)" (??1socket_h@@$$FQAE@XZ)
error LNK2001: unresolved external symbol "public: __thiscall socket_h::socket_h(char const *)" (??0socket_h@@$$FQAE@PBD@Z)
</code></pre>

<p>The code is as follows:</p>

<p>Class Header:</p>

<pre><code>class socket_h{
protected:
    ;//...

public:

    socket_h(const char*);
    int receive_data(char* szBuffer);
    int send_data(char* szMessage);
    ~socket_h(void);
};
</code></pre>

<p>Class Source:</p>

<pre><code>class socket_h{
protected: 

       ;//...

public:

socket_h()
{
    socket_h("192.168.5.100");
}

socket_h(const char* ip_address)
{
    ;//...;
}
//...
~socket_h(void)
{
    closesocket(sClient);

    WSACleanup();
}
};
</code></pre>

<p>Calling Function:</p>

<pre><code>private: System::Void read_socket_Click(System::Object^  sender, System::EventArgs^  e) {
         socket_h accelerometer("192.168.5.100");

}
</code></pre>

<h2>Issue #2</h2>

<p>I have a follow up error.</p>

<p>I am still looking for help with the above issue, but in order to save time, I added an extra method to the class and changed my calling function to:</p>

<pre><code>private: System::Void read_socket_Click(System::Object^  sender, System::EventArgs^  e) {

         socket_h accelerometer();
         accelerometer-&gt;setAddress("192.168.5.100", 80);
}
</code></pre>

<p>However, I now get the error:</p>

<pre><code>error C2227: left of '-&gt;setAddress' must point to class/struct/union/generic type   1664    1
</code></pre>

<p>I seem to have done everything correctly, and I don't understand why this may be happening. Thank you.</p>
