looks like that was the intention- but as it stands it will just show it once and go back to the prompt.
heres one that simulates the prompt.... I made it in VC++ 6- other compilers will likely require the removal of the stdafx line I believe.
well here it is.
#include "stdafx.h"
#include <string.h>
#include <iostream.h>
int main(int argc, char* argv[])
{
char cmdline[128];
char crlf[7]="\0xD\0xA";
int currmsg=-1;
do
{
currmsg++;
cout << endl;
printf("C:\\>",crlf);
gets(cmdline);
cout << endl;
if (currmsg==0)
printf("An Error occured processing a token in command line '%s'.%s A Possible reason may be you smell.",cmdline,crlf);
else if (currmsg==1)
printf("Disk error while processing command '%s'. Ensure you have applied sufficient deodorant to prevent your hard disk from being offended.",cmdline);
else if (currmsg==2)
printf("I was just about to execute your command, '%s', but changed my mind at the last second.",cmdline);
else if (currmsg==3)
printf("hey, stop telling me what to do. I'm not going to perform a '%s' just for you.",cmdline);
else if (currmsg==4)
{
printf("crap, it worked this time.");
for(int i=0;i<15;i++)
{
printf(".");
}
printf("whew, something bad happened when I tried.");
}
else if (currmsg==5)
{
printf("for gods sake, I thought you'd give up already!");
currmsg=-1;
}
printf(crlf);
} while (stricmp("quit",cmdline)!=0);
printf("%s%sdarn, you said the secret word. oh well.",cmdline);
return 0;
}