This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: string non defined


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]