【发布时间】:2017-06-20 20:21:32
【问题描述】:
我刚开始编程,但我不断遇到标题和内容方面的问题。 所以,每当我尝试运行代码时
// ConsoleApplication4.cpp : Defines the entry point for the console application.
#include "stdafx.h"
#include "std_lib_facilities.h"
int main()
{
return 0;
}
我收到这个警告说
无法启动程序“C:\Users\Gebruiker\documents\visual studio 2015\Projects\ConsoleApplication4\Debug\ConsoleApplication4.exe”。 系统找不到指定的文件。
此外,构建输出:
1>------ Build started: Project: ConsoleApplication4, Configuration: Debug Win32 ------
1>ConsoleApplication4.cpp
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\hash_map(17): error C2338: <hash_map> is deprecated and will be REMOVED. Please use <unordered_map>. You can define _SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS to acknowledge that you have received this warning.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========_
您可能已经注意到,我正在关注 Bjarne Stroustrup 关于这方面的书,但他根本没有具体说明如何处理这个问题。
无论如何,std_lib_facilities.h 头文件与 ConsoleApplication.cpp 位于同一文件夹中,正如他告诉我的那样。
我实际上并不认为这与这个程序有任何关系,因为我在做的所有项目中都面临这个问题。
哦,是的,我不得不说我已经检查了多个与此相关的问题,但这些问题与我的不匹配。
我也尝试了#include "../std_lib_facilities.h" 和#include "../../std_lib_facilities.h",但没有结果。(与 stdafx.h 相同)我尝试“构建”程序,但我实际上并不知道那是做什么的,我是否应该构建解决方案或 cpp,以及何时调试......
答案肯定不在书中,因为我已经继续阅读第 8 章,没有做练习,因为我无法让事情发挥作用。
(如果我在这个问题上搞砸了,也请告诉我,我需要少说话,提供更多细节或其他东西)
【问题讨论】:
标签: c++ c++11 visual-c++ visual-studio-2015