It's worth noting that this code shouldn't actually compile due to the window title being included as part of the video mode.
I presume this is a typing error when you wrote it here rather than a direct copy of the actual code that causes the error...