[Dev-C++] 'string' was not declared in this scope
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Flavio de S. <fla...@ya...> - 2003-11-26 01:10:31
|
I am trying to compile my program and I got an error:
'string' was not declared in this scope
Even if I put in the file #include <string>
What is happing?
See following my file header:
#ifndef MAX_REPLY_LENGTH
#define MAX_REPLY_LENGTH 512
#endif
#ifndef CRLF
#define CRLF \r\n
#endif
#ifndef MAX_COMMAND_LENGTH
#define MAX_COMMAND_LENGTH 64
#endif
#ifndef MAX_RECEIPT_BUFFER_SIZE
#define MAX_RECEIPT_BUFFER_SIZE 8192
#endif
//The stat command reply informs the number of messages and the size of
mailbox
#ifndef NUMBER_OF_STAT_REPLY_WORDS
#define NUMBER_OF_STAT_REPLY_WORDS 3 //The reply to STAT command will
give 3 words only
#endif
#ifndef POP3_h
#define POP3_h
#include <string>
#include "SocketConnection.h" //Maybe can occur errors here.
class POP
{
public:
POP();
virtual ~POP();
//--------------------------------
// POP Commands - AUTHORIZATION
//--------------------------------
int sendUser ();
int sendPASS ();
int sendQUIT ();
//--------------------------------
// POP Commands - TRANSACTION
//--------------------------------
int sendSTAT ();
int sendLIST ();
int sendLIST ( unsigned int Msg );
int sendRETR ( unsigned int Msg );
int sendDELE ( unsigned int Msg );
int sendNOOP ();
int sendRSET ();
//--------------------------------
// Optional POP3 Commands
//--------------------------------
int sendAPOP ( unsigned int Msg ); //valid in the AUTHORIZATION
state
int sendTOP ( unsigned int Msg ); //valid in the TRANSACTION state
int sendUIDL (); //valid in the TRANSACTION state
/*
Note that with the exception of the STAT, LIST, and UIDL commands,
the reply given by the POP3 server to any command is significant
only to "+OK" and "-ERR". Any text occurring after this reply
may be ignored by the client.
*/
int setPort ( int Port = 110 );
int setServerHost ( string ServerHost );
int setTimeOut ( unsigned int TimeOut = 30);
int setUserName ( string User );
int setPassword ( string Password);
int getPortNumber();
string getServerHostName();
unsigned int getTimeOut ();
string getHostReply();
unsigned int getMailboxSize();
unsigned int getTotalMessages();
unsigned int getCurrentMessageSize();
unsigned int getCurrentMessageNumber();
private:
SocketConnection _connection; //Socket object to stabilish
connection
bool _connectionUp; //Inform if connection is still Ok
string _receiverBuffer;//Receive reply from POP server
int _port;
string _serverHost;
string _user;
string _password;
unsigned int _timeOut; //Max waiting time in miliseconds
unsigned int _statusIndicator; //It holds 1 if response is "+OK"
and 0 if response is "-ERR"
unsigned int _totalOfMessages; //Holds the total of messages in
one session to download.
unsigned int _sizeOfMailbox; //Holds the size of the mailbox
unsigned int _sizeCurrentMessage;
unsigned int _currentMessage;
int _connect(); //Method that connects the socket
int _sendCommand( const char *Command ); //Send POP
command
};
#endif // POP3_h
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.543 / Virus Database: 337 - Release Date: 21/11/2003
|