How do I call local function from a static function?
<pre><code>#ifndef DATACENTER_H_
#define DATACENTER_H_

#include &lt;map&gt;
#include &lt;list&gt;
#include &lt;string&gt;

#include "LiLo/SoundInfo.h"
#include "MutexCondition.h"
#include "UserInfo.h"

using namespace std;

class DataCenter : MutexCondition{

private:

    map&lt;long long, list&lt;SoundInfo *&gt; &gt; m_soundListMap;


    void add(long long deviceId, SoundInfo* soundInfo);

public:

    DataCenter();
    virtual ~DataCenter();

    static void addSoundInfo(long long deviceId, SoundInfo *soundInfo);

};

#endif /* DATACENTER_H_ */
</code></pre>

<p>DataCenter.cpp file</p>

<pre><code>#include "DataCenter.h"

DataCenter::DataCenter() {
    // TODO Auto-generated constructor stub

}

DataCenter::~DataCenter() {
    // TODO Auto-generated destructor stub
}

void DataCenter::addSoundInfo(long long deviceId, SoundInfo *soundInfo){
    add(deviceId, soundInfo);
}

void DataCenter::add(long long deviceId, SoundInfo *soundInfo){
    list&lt;SoundInfo*&gt;&amp; info_list = m_soundListMap[55];
}
</code></pre>

<p>I am trying to access the function call addSoundInfo from other classes so I have set this as static. Since the m_soundListMap is not a static so I think I need another function to access to the local data structure. </p>

<p>Inside of the static function, I call add function to add SoundInfo to the list. However, I am getting an error in the static function and it says "Can not call member function .... without object".</p>

<p>How do I fix this problem? Thanks in advance..</p>
