Mail Archives: djgpp/2002/02/13/21:30:27
| X-Authentication-Warning: | delorie.com: mailnull set sender to djgpp-bounces using -f
|
| From: | "Brent Ritchie" <Juicer_X AT hotmail DOT com>
|
| Newsgroups: | comp.os.msdos.djgpp
|
| Subject: | djgpp and string?
|
| Lines: | 45
|
| X-Priority: | 3
|
| X-MSMail-Priority: | Normal
|
| X-Newsreader: | Microsoft Outlook Express 6.00.2600.0000
|
| X-MimeOLE: | Produced By Microsoft MimeOLE V6.00.2600.0000
|
| Message-ID: | <d9Fa8.18800$JZ.2060513@news20.bellglobal.com>
|
| Date: | Wed, 13 Feb 2002 21:19:54 -0500
|
| NNTP-Posting-Host: | 64.231.112.87
|
| X-Complaints-To: | abuse AT sympatico DOT ca
|
| X-Trace: | news20.bellglobal.com 1013653193 64.231.112.87 (Wed, 13 Feb 2002 21:19:53 EST)
|
| NNTP-Posting-Date: | Wed, 13 Feb 2002 21:19:53 EST
|
| Organization: | Bell Sympatico
|
| To: | djgpp AT delorie DOT com
|
| DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
| Reply-To: | djgpp AT delorie DOT com
|
Hello,
I'm trying to compile the following code, but djgpp won't let me use
strings? why? well if anyone can help.
The error says:
classa.h:6: 'string' is used as a type, but is not defined as a type.
classa.h:7: 'string' is used as a type, but is not defined as a type.
Main file:
#include <string>
#include "allegro.h"
#include "classa.h"
#include "test.h"
using namespace std;
bool end_game = TRUE;
int main()
{
init();
do {
} while (end_game);
return 0;
}
classa.h file:
class character
{
private:
int HP;
int MP;
string NAM;
string CLASSI;
public:
bool update();
character(string a, string b, int aa, int bb);
};
character::character(string a, string b, int aa, int bb) : NAM(a),
CLASSI(b), HP(aa), MP(aa) {}
- Raw text -