delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/06/24/06:15:56

From: Mark Collinson <mark DOT collinson AT unn DOT ac DOT uk>
Newsgroups: comp.os.msdos.djgpp
Subject: Using _String.h
Date: Thu, 24 Jun 1999 10:34:00 +0100
Organization: University of Northumbria at Newcastle
Lines: 39
Message-ID: <3771FB88.EF2E4586@unn.ac.uk>
NNTP-Posting-Host: monkey.unn.ac.uk
Mime-Version: 1.0
X-Mailer: Mozilla 4.51 [en] (WinNT; I)
X-Accept-Language: en
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Greetings,

Does anybody know how to use the _String.h header file. I am trying to
write the following:

#include <iostream.h>
#include <_String.h>

int main() {
String a;
String b;
String c;

a="Hello World";
b=", Goodbye cruel World";
c=a+b;
cout << c << endl;

return 0;
}

Unfortunately I always get a bombardment of errors like:

C:\mark\code>gxx -Wall -o test.exe test.cpp -lgpp
c:/djgpp/tmp\cccygxwf(.text+0x1b):strtest.cpp: undefined reference to
`String::String(void)'
c:/djgpp/tmp\cccygxwf(.text+0x29):strtest.cpp: undefined reference to
`String::~String(void)'
c:/djgpp/tmp\cccygxwf(.text+0x53):strtest.cpp: undefined reference to
`String::~String(void)'
.
.
.

Any help would be gratefully recieved.

Cheers,
Mark

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019