🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #17201

Re: how to convert a string to char[] ?

#17201
From: Chris W
Date: Wed, 02 Apr 2003 19:31
11 lines
1099 bytes
the string class has a member function to return a character array it is
called c_str()


string s = "Hello World!";
char c[20];
strcpy(c, s.c_str());


--
Chris W
Technical Details
Message-ID: <3E8B3A85.3EBD97EB@cox.net>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <3e8b36e7@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,a394e4c4a0169514
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-04-02 11:34:07 PST
Message-ID: <3E8B3A85.3EBD97EB@cox.net>
Date: Wed, 02 Apr 2003 13:31:17 -0600
From: Chris W <chrisw3@cox.net>
X-Mailer: Mozilla 4.79 [en] (Windows NT 5.0; U)
X-Accept-Language: en
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: how to convert a string to char[] ?
References: <3e8b36e7@newsgroups.borland.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 68.12.125.52
X-Trace: newsgroups.borland.com 1049311821 68.12.125.52 (2 Apr 2003 11:30:21 -0800)
Lines: 12
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail