Using C++ strings  under Digital Mars C++ compiler

zzhang2006 used Ask the Experts™
My question is how to use C++ string  under Digital Mars.. I have downloaded the zipped packages: and Not really knowing how to properly install them together other than just unzipped the folders, I tried a command line compiling the following code, which used to work though, simply with:

> ...\bin\dmc.exe   goesto4.cpp...

But I got "file not found"  error message for the  included <string> file.  Could anyone provide an example how to compile/link codes that use C++ string class?

 #include <string>
#include <math.h>

int number_of_letters = 0;

 string ones[10] = {"zero","one","two","three","four","five","six","seven","eight","nine"};


Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
evilrixSenior Software Engineer (Avast)

Normally, you can use the -I flag to specify where headers live.


...\bin\dmc.exe   goesto4.cpp -I /path/to/includes

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial