How to make classification Grad-Cam(heatmap)

I tried to make classification with c++.
And I am stuck making grad-cam(heatmap).

Is there any source or example for this?