| delorie.com/archives/browse.cgi | search |
| Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
| List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
| List-Archive: | <http://sources.redhat.com/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT cygwin DOT com> |
| List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs> |
| Sender: | cygwin-owner AT cygwin DOT com |
| Mail-Followup-To: | cygwin AT cygwin DOT com |
| Delivered-To: | mailing list cygwin AT cygwin DOT com |
| From: | "Dave Korn" <dk AT artimi DOT com> |
| To: | <cygwin AT cygwin DOT com> |
| Subject: | [OT] RE: g++ include string.h |
| Date: | Mon, 17 May 2004 19:32:36 +0100 |
| MIME-Version: | 1.0 |
| In-Reply-To: | <c8aubs$mce$1@sea.gmane.org> |
| Message-ID: | <NUTMEGbwwOrjmdVetfu00000134@NUTMEG.CAM.ARTIMI.COM> |
| X-OriginalArrivalTime: | 17 May 2004 18:32:36.0882 (UTC) FILETIME=[53BD8F20:01C43C3D] |
> -----Original Message-----
> From: cygwin-owner On Behalf Of Christian Rudiger
> Sent: 17 May 2004 19:00
> Hi there,
>
> i'm kind of newbee to c++ programming and try to do my first
> steps with
> the gcc in delivered with cygwin.
>
> I'd like to include the string.h into my little program but it wasn't
> found as the compiler doesn't accept my string declarations.
#1: string.h has nothing to do with the c++ string class. string.h is the
old c-style functions, string (no extension) contains the C++ string class.
#2: If a header file wasn't found, the compiler would issue an error or
warning, not just silently ignore it.
#3: All the standard C++ classes live in a namespace called 'std', so you
want to refer to them either as "std::string" or have a "using namespace
std;" statement at the top of your file.
#4: None of this is remotely cygwin-specific; you want to read a basic
tutorial on C++/stl programming. There are problems with the rest of your
code as you'll see once you've added the namespace line, but it's all
completely generic c++ stuff and this won't be the right place to bring them
up.
cheers,
DaveK
--
Can't think of a witty .sigline today....
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |