When i compile this code using the developer commands prompt from visual studio 2015 the program works but i get these errors:
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\xlocale(341): warning C4530: C++ exception manager used, but removal semantic is not enabled. Specify /EHsc
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\exception(359): warning C4577: it has been used 'noexcept' without specify the modality of exception management. Termination in case of exception is not guaranteed. Specify /EHsc