Compiling problems

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


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <cmath>
using namespace std;
inline void keep_window_open() { char ch; cin>>ch; }

int main()
{
	cout << "Hello, world!\n";
	keep_window_open();
	
	return 0;
}
closed account (48T7M4Gy)
https://msdn.microsoft.com/en-us/library/2axwkyt4.aspx
ok, how to compile with /EHsc?
closed account (48T7M4Gy)
https://msdn.microsoft.com/en-us/library/3600tzxa.aspx

Surf the toolbar menus in Visual Studio.

Keep in mind they are only warnings and as an example your program runs in the shell here.
Topic archived. No new replies allowed.