delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2002/10/26/21:15:07

From: "A. Sinan Unur" <asu1 AT c-o-r-n-e-l-l DOT edu>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: djgpp
Date: 27 Oct 2002 01:09:40 GMT
Organization: Cornell University
Lines: 40
Sender: asu1 AT cornell DOT invalid (on pool-141-149-208-118.syr.east.verizon.net)
Message-ID: <Xns92B3D743ACEE7asu1cornelledu@132.236.56.8>
References: <20021026234750 DOT 92281 DOT qmail AT web21509 DOT mail DOT yahoo DOT com>
NNTP-Posting-Host: pool-141-149-208-118.syr.east.verizon.net
X-Trace: news01.cit.cornell.edu 1035680980 5239 141.149.208.118 (27 Oct 2002 01:09:40 GMT)
X-Complaints-To: usenet AT news01 DOT cit DOT cornell DOT edu
NNTP-Posting-Date: 27 Oct 2002 01:09:40 GMT
User-Agent: Xnews/5.04.25
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019