#incude "apstring.h" C++ 工作没有人知道吗?

#incude "apstring.h" C++ isn't working anyone know?

本文关键字:没有人知道 工作 C++ apstring #incude      更新时间:2023-10-16

当我尝试包含apstring.h时,我有一个错误,有人知道替代代码等吗?下面是错误所在的代码:

#include <iostream>
#include "apstring.h" //error is located under #include, the error is     (Error: cannot open source file "apstring.h")
using namespace std;
int main()
{
system ("pause");
return 0;   
}

你可以在这里找到头文件:http://mathbits.com/MathBits/CompSci/apstring.h

和对应的cpp文件:https://users.cs.duke.edu/ola/美联社/代码/apstring.cpp

你必须用strcpy_s代替strcpy以避免安全问题

这是我在visual studio 2015中与您的程序一起工作的两个文件的链接:

http://pastebin.com/qanbAF1D

你只需要在visual studio中创建一个控制台应用,添加你的主文件和提供的CPP文件

,然后在visual studio中添加名为header Files的头文件部分添加头文件

如果你在Linux下,你必须把文件放在同一个目录下,但我没有在Linux下测试