References must be initialized when defined, however this doesn't work for non-static members, thus you must initialize the reference in the class initializer list.
Let's say I have :
Terrain::Terrain(****, Camera & cam) //terrain.cppand I call it this way:
g_Terrain = new Terrain(****, &g_Camera); //main.cpp
Changing it to:
Terrain::Terrain(****, Camera & cam):m_Camera(cam) // terrain.cppdoes not help, where m_Camera is declared like this
Camera & m_Camera; // terrain.h