C++ can i declare on reference member?
<p>In the h file i declare:</p>

<pre><code>static IDataSynchronization&amp; sync_data_;
</code></pre>

<p>But in the cpp , I have compilation error for sync_data_ :</p>

<pre><code>IDataSynchronization&amp; MasterSlaveSynchronize::sync_data_;
</code></pre>

<p>Error is :</p>

<pre><code>MasterSlaveSynchronize::sync_data_ declared as reference but not initialized
</code></pre>

<p>I can , but dont want to declare is as a pointer and i want to learn what is the problem here and if there is a way to bypass this.</p>

<p>I cannot initialize at declaration , because this is kind of callback that will pass at setup (no constructor , static setup).</p>

<p>Thank you</p>
