Tuesday, June 30, 2009

An Innovative way to call for Lunch

Class SamIndra : public Friends
{
public:
//For writing into your mind
istream cin;
//For Writing out of your mind
ostream cout;
//List that holds ur moods
std::list<CString> moodList;
//Get Response from specified objects/ALL (when obj=NULL)
CString* getResponseFrom(CString&,SamIndra &obj ==NULL);
//Send Response to all objects.
int sendResponse( CString );
//Store response from all
//0-banda, 1-chom, 2-kp, 3-Sesu, 4-venu,
//5-Grandhi, 6- theeta, 7-jittu, 8-panthu, 9-Deeps
CString responseData[9];
}I,U[8];
LDFALGS=-L./Lib -lsamindra
void main(void)
{
(I.moodList).push_front(CString("Feeling hungry"));
I.responseData[p]=I.getResponseFrom( (I.moodList).front(),NULL);
for(int p=0; p<9; color="#666666">p++)
{
if( INVALID_RESPONSE(I.responseData[p]) )
{
do
{
SamIndra *lafutObj=Friends::getSafeHandle(U[p]);
lafutObj->cin>>"Pada Bhey Lafut";
} while( lafutObj->cout!=="Ok" );
}
}
I.moodList.pop();
I.cin>>"Go to cafeteria and eat";
return;
}

No comments:

Post a Comment