Originally Posted by
laserlight
Yes.
Now, onto other things: what does your CLA class model? It looks like it is doing too many things. Some of its member functions seem to have suitable names for entire classes
well because its the first time i use mapped arrays , i dont know how to implement these two sessions . thats why it looks so wierd and probably wrong!!
it just gets user input !( should contain an array that contains strings (some statements! )
and its simply asbefore i use mapped array)
Code:
CLA::CLA(string user_input)
{
InputString(user_input);
}
and now i think this should be sth like this now:
Code:
CLA::CLA((map<int, string>) str)
{
InputString(str);
}
and in InputString() we have :
Code:
void CLA::InputString(string user_input)
{
cout<<"Enter your String Please\n ";
getline( cin, user_input );
int linecounter = -1; //counts the number ofstring input by user
OurString = user_input;
while (!exitscanner(OurString))
{
OurString = user_input;
StringCollector[linecounter++] = OurString;
//cout <<"\n$CLA$ "; //shows the user to input again.
getline( cin, user_input );
}
}
w