View Single Post
Join Date: Oct 2008
Posts: 7
Reputation: Trader09 is an unknown quantity at this point 
Solved Threads: 0
Trader09 Trader09 is offline Offline
Newbie Poster

Re: How to read strings into 1D array and more?

 
0
  #7
Nov 30th, 2008
Originally Posted by VernonDozier View Post
	static int messageIDGen;
public:
	Message();

	Message(string,string,string,string);

Just noticed this line. I guess you are supposed to use messageIDGen to produce the messageID. So you never pass it a value from the driver. Have messageID assigned in your constructor. Assign messageID to equal messageIDGen, then increment messageIDGen. Do all of this in your constructor. You probably aren't supposed to have a setMessgeID function. I hadn't noticed the messageIDGen variable before and the fact that it is static. Was that given to you or did you create it yourself?
Thanks again, the following was given:

attributes:
sender : string
recipient : string
body : string
date : string
messageID : int
messageIDGen : static int

member functions:
Message( );
Message(string, string, string, string);
~Message( );
void setSender(string);
void setRecipient(string);
void setBody(string);
void setDate(string);
string getSender( );
string getRecipient( );
string getBody( );
string getDate( );
int getMessageID( );
string toString( );
Reply With Quote