Hello, I would like to create a head bobble effect with C++.

So a lot of this doesn’t make sense to me I have created a new project with axis mappings made a character class coded it to walk and look around I’m curious how I implement this code you’ve given me? e.g this ‘Accumulator’ variable do I make it a float or?