The code in the book is missing the gainParamID constant. Later, on pg. 174, it is included (we added this line on pg. 167, it's supposed to be there), so it's only missing on pg. 170's listing. The code should read:
#pragma once
#include <JuceHeader.h>
const juce::ParameterID gainParamID { "gain", 1 }; // <- This isn't in the book on pg. 170
class Parameters
{
public:
Parameters(juce::AudioProcessorValueTreeState& apvts);
static juce::AudioProcessorValueTreeState::ParameterLayout createParameterLayout();
juce::AudioParameterFloat* gainParam;
};