Cannot open include file: 'algorithm': No such file or directory

来源:百度知道 编辑:UC知道 时间:2024/06/28 16:55:08
我的VC++6.0运行stl会有错误: Cannot open include file: 'algorithm': No such file or directory。好像是缺少什么库函数,哪位大侠解答下?
我同学可以运行,没有问题。不需要包含stdio.h.

VC6没有发现头文件<algorithm>

头文件<algorithm>与头文件<stdio.h>在同一个目录下,你包含<stdio.h>看看,如果这个文件可以找,则说明安装VC有问题,请重新安装。

如果stdio.h也找不到,请在VC中点击tools菜单--options-directories,在弹出的对话框中选include files项目,把“ D:\Program Files\Microsoft Visual Studio\VC98\INCLUDE”(根据你的安装位置修改)加到其中

这样如果还是不行,就重新安装VC

#include <algorithm> 就可以了。
不要
#include "algorithm.h"