Mail Archives: djgpp/2002/10/26/21:15:07
Stephen Yau <thc_syau AT yahoo DOT co DOT uk> wrote in
news:20021026234750 DOT 92281 DOT qmail AT web21509 DOT mail DOT yahoo DOT com:
> I'm having heaps of errors with all my programs. I get error messages
> each time i use an array or use the string functions but i include
> <string.h> and i've had problems when using namespace std is in the
> program as well as an array it says:
>
> no match for std::ostream& < const char *, const char*)
>
> i've been using <iostream> and using namespace std for cout function.
>
> is some files in djgpp too old to support these functions or
> something???
yeah, right.
> I've got over twenty programs with problems in these functions so
> reply me soon as possible!!!!
aye aye sir ... string.h and string are different headers. if you want to
use the C++ header with the string class, use
#include <string>
if you want the standard C string functions, use
#include <cstring>
in a C++ program, or
#include <string.h>
in a C program.
--
A. Sinan Unur
asu1 AT c-o-r-n-e-l-l DOT edu
Remove dashes for address
Spam bait: mailto:uce AT ftc DOT gov
- Raw text -