Я написал простой код на C ++ в VSC, и когда я его компилирую, cl выдает мне некоторые ошибки, хотя компилируется отлично. Код такой:
#include <iostream>
int main()
{
// Print welcome messages to the terminal
std::cout << "You are a secret agent breaking into a secure server room\n";
std::cout << "You need to enter the correct codes to continue..." << std::endl;
//Declare 3 number code
const int CodeA = 4;
const int CodeB = 3;
const int CodeC = 2;
const int CodeSum = CodeA + CodeB + CodeC;
const int CodeProduct = CodeA * CodeB * CodeC;
// Print sum and product to the terminal
std::cout << std::endl;
std::cout << "+ There are 3 numbers in the code" << std::endl;
std::cout << "+ The codes add-up to: " << CodeSum << std::endl;
std::cout << "+ The code multiply to give: " << CodeProduct << std::endl << std::endl;
int GuessA, GuessB, GuessC;
std::cin >> GuessA;
std::cin >> GuessB;
std::cin >> GuessC;
std::cout << "You entered: " << GuessA << GuessB << GuessC << std::endl;
return 0;
}
Я получаю следующие сообщения об ошибках:
C: \ Program Files (x86) \ Microsoft Visual Studio \ 2019 \ Community \ VC \ Tools \ MSVC \ 14.29.30037 \ include \ ostream (284): предупреждение C4530: используется обработчик исключений C ++, но семантика раскрутки не включена. Укажите / EHsc
C: \ Program Files (x86) \ Microsoft Visual Studio \ 2019 \ Community \ VC \ Tools \ MSVC \ 14.29.30037 \ include \ ostream (269): примечание: при компиляции функции-члена шаблона класса 'std :: basic_ostream ‹char, std :: char_traits ›& std :: basic_ostream‹ char, std :: char_traits ›:: operator ‹< (int) '
triplex.cpp (22): примечание: см. ссылку на создание экземпляра шаблона функции 'std :: basic_ostream ‹char, std :: char_traits› & std :: basic_ostream ‹char, std :: char_traits› :: operator ‹< (int)' будучи составлен
triplex.cpp (7): примечание: см. ссылку на компилируемый экземпляр шаблона класса 'std :: basic_ostream ‹char, std :: char_traits›'
Может кто-нибудь объяснить мне, что это такое? Заранее спасибо!