Move to move forward when pressing left and right mouse button at the same time in c++?

bool RMB;

I don’t know how is your code. And seems you don’t know C++
Why do you want to do this in C++?