glutInitWindowPosition(2500, 100); // Set the position of the window
2500 seems a little high for the x coordinate. Maybe you meant something like 250 instead?
If you find the console window to be a nuisance, you can always make it not show up by selecting Windows (/SUBSYTEM:WINDOWS) under Linker -> System -> SubSystem in your project settings.
Of course you are right. I wrote this code at work where I work with two monitors. At home I simply copy/pasted the code without even considering that something might be wrong.