This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: string non defined
- From: Larry Hall <lh-no-personal-replies-please at cygwin dot com>
- To: "electa" <electabuzz at katamail dot com>, cygwin at cygwin dot com
- Date: Sat, 24 Jul 2004 17:26:53 -0400
- Subject: Re: string non defined
- References: <cdubvq$bpq$1@sea.gmane.org>
- Reply-to: Cygwin List <cygwin at cygwin dot com>
At 03:07 PM 7/24/2004, you wrote:
>I have a little c++ code that do not run in Cygwin (but in Linux yes)
>because
>g++ says 'string' not defined.
>string is a variable type as I see in the code:
>string chip::prepare( string s )
>
>what is the Linux-like definition? and how I add that to the code to go on
>with g++?
In these situations, it's best to provide a small piece of sample code
so that others can see exactly what you're doing and can try to reproduce
the problem themselves. Without that, my WAG is that you're using 'string'
but didn't precede it by "using namespace std;". Given the above one line
of code, it's clear you're not using the 'std' namespace scope qualifier
explicitly on each use of 'string'. You're probably also not using the same
version of gcc on Linux so that the namespace usage is not required there.
--
Larry Hall http://www.rfk.com
RFK Partners, Inc. (508) 893-9779 - RFK Office
838 Washington Street (508) 893-9889 - FAX
Holliston, MA 01746
--
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/