| delorie.com/archives/browse.cgi | search |
| From: | John Clonts <johncc AT my-deja DOT com> |
| Newsgroups: | comp.os.msdos.djgpp |
| Subject: | Re: Catenation (spelled right?) of strings |
| Date: | Mon, 16 Aug 1999 23:23:47 -0500 |
| Organization: | Clonts Family |
| Lines: | 19 |
| Message-ID: | <37B8E3D3.516@my-deja.com> |
| References: | <37B36D0D DOT 7F00 AT lords DOT com> |
| X-Complaints-To: | newsabuse AT supernews DOT com |
| X-Mailer: | Mozilla 3.01 (Win95; I) |
| MIME-Version: | 1.0 |
| To: | djgpp AT delorie DOT com |
| DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
| Reply-To: | djgpp AT delorie DOT com |
Robinson S. wrote:
>
> Is it possible to group a bunch of strings into an array of char:
>
> I tried this:
> char THE_STRING [255];
> THE_STRING = "GOATS " + "MAKE " + "GOOD " + "PETS!";
>
> My compiler (DGJPP gccw32.exe) says: "invalid operands to binary +"
>
#include <string>
int main()
{
string theString = "GOATS " + "MAKE " + "GOOD " + "PETS!";
}
Cheers,
John
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |