我的问题是如何在数字火星下使用C++字符串。。。 我已经下载了压缩包:dmc587c.zip和stlport.zip。 除了解压缩文件夹之外,我还不知道如何正确地将它们安装在一起,所以我尝试了一个命令行来编译下面的代码,虽然它以前可以简单地使用:
> ...\bin\dmc.exe goesto4.cpp...
但是我得到了包含文件的“文件找不到”错误消息。 有人能提供一个如何编译/链接使用C++字符串类的代码的例子吗?
#include <string>
#include <math.h>
int number_of_letters = 0;
string ones[10] = {"zero","one","two","three","four","five","six","seven","eight","nine"};
通常,您可以使用-i标志来指定标头所在的位置。
例如。
...\bin\dmc.exe goesto4.cpp -I /path/to/includes