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

zzhang2006
zzhang2006 used Ask the Experts™
on
My question is how to use C++ string  under Digital Mars.. I have downloaded the zipped packages: dmc587c.zip and stlport.zip. 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"};


Thanks

Ze
Comment
Watch Question

Do more with

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

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

Eg.

...\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